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.
rather than ignoring the original settings, why not do something like

```
return new Promise(function(resolve, reject) {
    $.ajax(url, settings).then(function(data, status, jqXHR) {
        resolve(data);
    }, function (jqXHR, status, error) {
        log_ajax_error(jqXHR, status, error);
        reject(wrap_ajax_error(jqXHR, status, error));
    });
});
```

That way the original url and settings are unchanged.