Move functions relating to notebook JSON representation, to a new file

This file handles conversion to/from on-disk format (which requires splitting/joining mulitline strings, see IPEP 17).  It also handles creating a new notebook.  The new notebook creation is updated to the v4 format described in IPEP 17.