Add JS config API

This depends on #6694 for the server side part of the config API, and on #6818 for the promises polyfill for certain browsers.

It adds a JS API for the config service, which would be used like this:

```javascript
// initialisation code in main.js
config = config.ConfigSection('notebook', {base_url: base_url});
config.load();  // async!


// later code that wants to use config
config.loaded.then(function() {
    do_something_with(config.data.key || default);
});

// Code changing config
config.update({key: 'new value'});  // async!
```

Both `load()` and `update()` return a promise. :horse: 
You can remove the three lines above.