Bug 998847 - [Settings] refactor storage.js with AMD pattern