Session close (initial step)

just an initial commit. it allows explicitly close the session from the
Live Development icon and it also closes the session after the last
connection was closed.

(on top of previous PRs)