First close all sessions, THEN start waiting for completion.
Remove the setContext call, from server.stop() as the methods inside
ServerSession are already handling the context switching.

Also make the sessionContext 'final', it simplifies the code and we
can assume more about it