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.
I'm applying the Python principle of 'one way to do it'. If I build an API on promises, I don't give the user the choice to pass callbacks in instead: they have to use promises.