Allow keyboard to use cat drop-down (bug 890986)

This branch re-instates the ability to use the cat dropdown with the keyboard whereas previously it closed as soon as you tab off the first link in the drop-down.

There was some duplication in the dropdown toggling so that's been factored out. I've removed what seem to be unnecessary event handlers though not knowing some of the background of why they were added I'm happy to re-visit some of that if there's a need to.

I've removed the mouse-down tick as the dropdown closes so fast it's not really worth doing that afaict.

I've also narrowed the escape key toggling to just the menu and dropdown it seems a bit odd to me that globally hitting escape toggles open and closed the dropdown without this patch.