(#2735) - always populate the default constructor and add sync wrap
(#2543) - fix call stack exceeded err

In addition to the fix in pouchdb-extend,
we needed to implement a custom JSON.parse/
JSON.stringify just for the rev trees.