Add a site online deferred to app.js

* Add app.$siteOnline as a jQuery deferred. The deferred is resolved
when the app is fully started and listening on the designated port.
* Modules that load app.js can examine app.$siteOnline to see if the site
is online.
* Update before hook of site_login_test_mocha to wait until the application is
started before running tests.