[MINOR] maintain a global session list in order to ease debugging

Now the global variable 'sessions' will be a dual-linked list of all
known sessions. The list element is set at the beginning of the session
so that it's easier to follow them all with gdb.
5 files changed