Add JS config API
Fix punctuation
Use promising_ajax in config API
Actually define the module

I didn't forget something really obvious and important. Not at all.
Fix some other bugs
Merge pull request #6874 from takluyver/config-js-api

Add JS config API