Revert "Remove unnecessary (and badly implemented) Angular promise wrapping and chain directly on PouchDB's promises"

This reverts commit 28b2cd4eb8630a98d8d3c5d265bad71f830a07df.
Use built in $q shorthand functions when wrapping external promises, and use .catch more consistently