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