Fix $digest already in progress. https://github.com/wspringer/angular-pouchdb/issues/1
Initial work on updating and rewriting to run in a web-worker.
Saving progress unti PouchDB can be run in a webworker.