Fix $digest already in progress.

Fixes https://github.com/wspringer/angular-pouchdb/issues/1

There might be a better way but this works.