Fix a few lingering code bugs.

* emitWith leaking eventName into global scope; (Avoid this throughout Events by switching to evName as an argument and eventName as a variable everywhere.
* Finish incomplete comment about wait() in Preloader.readyPromise.
* Change wait() into a function expression as it turns out this is technically not valid ES3/ES5. It’s an extension supported by most engines, which is also unsupported in strict mode.
* Found a remaining whitespace typo “( ( ... ))” -> “( ( ... ) )”.
* Fix use of exception which doesn’t exist in JS to use of Error.
Start using ES5’ strict mode.
Fix bug in the grunt copy:icons task not copying the icons into the diet folder.
Do a little bit of style cleanup.
Start using jshint to lint the JS files.
Use `grunt dist-*` instead of `grunt dist:*`.
Use smart spaces for the requires.
Split ui.js up into multiple ui/*.js files.