This change both improves readability and fixes potential race-condition issues where promises were nested instead of being chained. Also includes: * Use arrow functions and Promise shorthands * Remove the obsolete `asyncTestDiscourse` helper
If a flagged post has edits, show the pencil icon and pop up the history window when clicked.