Use promises in the JS contents API

Switch from passing success/error callbacks to returning ES6 promises.

Opening early so we can see if Travis likes simple promise use cases.
Oh wow. From a bit more searching, resources for HTML tags are loaded asynchronously, but JS execution of script tags is guaranteed to be synchronous (unless you use some HTML attributes to tell it otherwise).

I guess we could do this as a separate script tag, then. It still seems neater to me to just require it, but if the consensus is for a separate tag, I'll change this.