Fix remote GDB debugging

-Also works on Android
Add proper handling for some special control characters

-Fixes OS progress display
Minor cleanup, implement settings and session management (reset, restart)
Merge remote-tracking branch 'upstream/qt' into qt