[BUGFIX] Sessions are never properly closed

The session lifecycle has distinct steps for the time a program has ended
and when the session is really finished. The latter was however never
set; this is fixed with this commit.

This might have further impact on the way a session is shutdown, e.g.
for closing the stream (this should not happen when the debugger engine
stops, i.e. the program ends, but only when the session was finally
closed and no further interaction with the debugger is necessary).
[FEATURE] Quit client after current session