Don't require HistoryManager to have a shell

Allows use of HistoryManager to work with history database without a shell instance present.