Add test code to make sure that history database errors caused by duplicate session/line numbers are handled correctly (don't crash, get new session).
Add test code to make sure that history database errors caused by duplicate session/line numbers are handled correctly (don't crash, get new session).

ipython/ipython,ipython/ipython