Remove `Discourse` constant usage (PR #10470)

Many small commits to remove our usage of Discourse constants from the Javascript codebase.

GitHub