support for _replicate api

Using pouchdb's .replicate method to support db->db repliation.