Cleaner shutdown
Cleaner shutdown

Reset recreate a new history; so ther is no point in calling it after
closing history session.

Unset  class variable to be sure they are not reused.

ipython/ipython,ipython/ipython