[refact] adds localStorage utility and moves localStorage helper methods to utils
config.js suggested changes @svnlto

* * *

This commit was sponsored by The Hoodie Firm.
You can hire The Hoodie Firm:
http://go.hood.ie/thehoodiefirm
[wip]
[wip]
[fix] return json
[fix] tidy up getObject helper method
[tests] comment out dodgy tests
[wip] added localstorage mock, fixed patching @snvlto

* * *

This commit was sponsored by The Hoodie Firm.
You can hire The Hoodie Firm:
http://go.hood.ie/thehoodiefirm