contents.js wrapper for contents service

This is PR #6671, rebased because it's a blocker for the text editor components, and @fperez asked me to make that high priority. So far, I've just rebased, I intend to test it and fix things I see.
How about having three functions that mirror the 4 types of file in the IPEP?

We already treat directories differently.  Why not also treat notebooks differently to ordinary files?  Then we have list_files, save/load notebook, and save/load file.

I think this is a better approach because I think it's very unlikely that the caller will be able to handle either kind of response.  If you the caller is trying to load a notebook, getting back a raw utf8 file won't be helpful.  Similarly, If the caller isn't specifically loading an IPython notebook (e.g. they open an ipynb file with a text editor) they won't want the notebook JSON (which has been processed on the Python side).

Binary and text files can probably share the same function.