panel: Implement automatic hiding of panel

Note we only do autohide for enter/exit of the panel region, and we
currently don't support "intellhide". This will come later.