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.
While all the JS code has been modified to avoid HTTP calls to the server to do file management, there notebook server still makes calls the the NotebookManager when creating the page.  Therefore it needs this stub to convince the notebook server that everything is ok.

For example, if you load a page for a particular notebook, it will call notebook_exists and give a 404 error if it doesn't return True.