Fixes MOBILE-468
Continuously prefixing objects in the db with the site id throughout the code was inefficient, instead prefixing is now done within MM.db
Config data could be considered 'global', so a scenario existed that data would have no siteid.
At the start, all settings data was read into the MM.config object, now only global and site specific data is read in.
Additional functions added to MM.db: exists ( does a collection exist ) and update ( update a specific element within a collection ).
The MM.db.get function queries based on id and site id unless the global flag is set.
Data in the sites collection is global
Fixes to previous commit
If the current site is unknown, you can't get specific site settings for it.
Getting current site information is global information
Fixes related to comments on previous commit
Merge pull request #14 from moodlehq/FIX-MOBILE-468

Fix mobile 468