Moved most of the functionality from JUCEApplication into JUCEApplicationBase, so that it can be used without needing juce_gui_basics to be present.