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
We don't check on script anymore, but we still check on window.ace making very unlikely to regress.
loadScript
to avoid Content Security Policy unsafe-line violations