(#3084) - API-level debug mode

Holy wow, this is one of the most exciting things we've added recently. Good find @daleharvey.

Check out this beautiful log output. I'm actually going to start using this when I work with PouchDB myself! It's great for revealing performance bottlenecks; e.g. you can see how many times it calls `compactDocument` when auto-compaction is turned on.

![](https://raw.githubusercontent.com/pouchdb/pouchdb/4740ae7c343b004dc0f85201e09748c34abc4f4f/docs/static/img/debug_mode.png)
no worries, it just sets the max-width to 100% so might be okay in this case, will check later.