Store the initial collection parameters to allow a safe reset to the first page (COUCHDB-2187)

When adjusting page size, the desired behaviour is to navigate back to the first page of the collection. This was previously achieved by parsing the browser URL to get the query parameters but that does not capture additional defaults that are set in JavaScript (such as reduce=false for views).

This commit adds 2 new methods to the document collections via a mixin:

saveDefaultParameters()
restoreDefaultParameters()

When each collection is initialized, we save the parameters which represent the initial state - these can then be restored when the page size is changed.

Fixes COUCHDB-2187.