Fixes dropdown not closing on clicking the dropdown toggle.

The cause of the bug is the way we listen to events. The toggle method
is listened for on the document body, and the global menu clearer
is attached to the document body. This causes `clearMenus` to be
called before the toggle event, so the menu is always kept open.

This fix applies an event listened to the document, listening on the
document body for a global `click` event. This allows the event to be
correctly cancelled by `toggle`, which stops event propagation and
prevents a second `clearMenu` call.