Some refactoring and bug fixing.

Please review and send me feedback. Here's a summary of changes:

* Adding safe flag to mongo setup to get ride of warnings.
* Centralizing database connection. Now only makes one.
* Moving `conf/pagespeed.js` to `conf/pagespeed.json` to allow for easier configuration. `pagespeed.js` still works for backwards compatibility.
* Adding some basic unit tests.
* Resetting error status to false if no errors to allow for recovery.
* Removing persistent error state incase googlespi fails.
* Fixing issue where pagestats get saved under wrong URL.