AngularJS service for PouchDB