Fix debugger crashes on exit and don't leak not started debug sessions
test_gdb, test_micommand, test_micommandqueue, test_miparser, test_lldb and test_lldbformatters still pass with these fixes.
6 tests from test_gdbprinters fail. But I assume they fail in master too. !142 (closed) contains a fix for test_gdbprinters failures.
See commit messages for details.