qt: Move AppInit2 and Shutdown to a 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

Depends on #3488 and #3492