qt: Move AppInit2 and Shutdown to a thread

Run initialization and shutdown in their own thread instead of the UI thread.

- Allows a more responsive splash screen (goes away immediately when clicked!)
- Prevents `Process does not respond` messages from the window system while initializing (common complaint)
- Show a `Bitcoin Core is shutting down...` window while shutting down
- ~~Hopefully~~ fixes Ubuntu issue #1242 preventing the menu and icon from appearing
- Cleans up the initialization code by moving initialization phases into methods on the Application object