(daleharvey/pouchdb#1658) - add persisted indexes

This implements persisted indexes (using _design
docs, ala Couch) by leveraging the indexable
string from pouchdb/collate.  It does not require
changes to daleharvey/pouchdb. Map/reduce output
is stored in a separate PouchDB.

The tests have been modified to test both
persisted views and temp views where appropriate.