Moving more things off of MainWindow

Moving methods from MainWindow to QGCApplication so that more things can run without a window. Helpful for testing.