Store the initial collection parameters to allow a safe reset to the first page.

When adjusting page size, the desired behaviour is to navigate back to the
first page of the collection. This was previously done using the browser
URL but that does not capture additional defaults that are set in JavaScript.

This commit adds 2 new methods to the document collections:

saveDefaultParameters()
restoreDefaultParameters()

When each collection is initialized, we save the parameters (which represent the
initial state) - these can then be correctly restored when the page size is changed.

Fixes COUCHDB-2187.