move bootstrap logic back to index
added new static methods

You can now use Application::startInstance() to create an application
instance.. and Application::getStartedInstance() to return an existing
application instance..