Split Backbone.sync out into its own module
Centralize fns for updating db & implement patch history

There is only one copy of the data tree stored now, in the `localData`
objectStore. To update it, one must call db.updateLocalData with the new
data and an optional message. When using that function, not only will
the data be replaced, but forward and backward patches will be stored
enabling a version history and potentially undo/redo functionality.
Make JSON serializations of models match data model