Unify and refactor how we get and use platform info
Merge remote-tracking branch 'upstream/master' into break-app-vs-ui-circular-dependency
Deal with circular dependency between app and UI

* Removed SparkModel.instance to avoid clients mistakenly deciding they can use the singleton at any time. SparkModel is still a singleton by nature, ensured by an assert().
* Split Spark ctor into a bare minimum ctor + init(), the latter to be called only once the UI is guaranteed to have loaded.
* Added SparkPolymerUI.modelReady() to initialize the model in the UI after the model has started.
* Reshuffled startup sequence to implement the following sequence using the above:
   1) The UI loads.
   2) The model (the app) starts up, looking up necessary HTML elements in the ready UI.
   3) UI is notified that the model has started, in order to initilize it for use in the event handlers and to refresh the UI.
Review comments
Merge pull request #1677 from ussuri/break-app-vs-ui-circular-dependency

Break the circular dependency between the app and the UI to stabilize startup