Fixes for the cog/gear settings dropdown menu

This change makes the dropdown menu behave more predictably. No more needing to hover over the menu to make it disappear, or hovering off it to make it come back.