Rewrite 'Settings' to use the 'Preferences' object for storing and retrieving data

This PR is a follow-up of #3850, and implements what @brendandahl suggested previously: https://github.com/mozilla/pdf.js/pull/3255#issuecomment-26374851.
This patch makes a number of changes:
* Changes the name of `Settings` to `ViewHistory`, to avoid confusion with `Preferences`.
* Uses an instance of the `Preferences` object to read/write the data, to avoid unnecessary code duplication.
* Adds default values, to avoid having to specify them every time when getting values from `ViewHistory`.
* Adds a function to set multiple values at once. This means that for each call to `updateViewarea`, the `database` will now be written *once* after all the values are set, instead of five times in succession.