Separate get_session_info between HistoryAccessor and HistoryManager
Separate get_session_info between HistoryAccessor and HistoryManager

HistoryAccessor has no concept of the current session, whereas
HistoryManager does. HistoryAccessor should therefore always be used
with a session number > 0. However, I have added get_last_session_id()
to HistoryAccessor to make it easier to work with recent history.

Closes gh-5348

ipython/ipython,ipython/ipython