chore(js): convert JS to AMD for several plugins

BREAKING CHANGE:
If you were loading any js from core plugins with, for example, `elgg_load_js('elgg.discussion')`,
you will need to change that to use AMD, like so: `elgg_require_js('elgg/discussion')`.