Convert JS to AMD for several plugins

Edit: This is no longer a breaking change but a feature + deprecation. Hopefully this will at least push people toward AMD by giving them more examples and deprecation warnings, even though we still don't get to use the libraries ourselves... :(

- [ ] Undelete js/discussion/discussion.js
This file was introduced in 1.9, so there's no BC concern. Or am I missing something?