Use the models to interact with the server

Models and collections now inherit from base classes with nice
utility functions for synchronization.
Fix bug when updating collection
Some frontend fixes for collections
Merge pull request #61 from girder/js-model-refactor

Js model refactor