Track FileHistory panel open context correctly

Earlier logic for tracking whether the quick panel showing the
history was open or not was a bit messy. This changes it to be more
explicit by having the FileHistory object expose public routines
the command is supposed to call when the context is activated or
deactivated.