Bug 1116537 - Make the history panel work

Updates the history panel to show current history and makes clicking on rows work. Only the last two commits here are relevant.