Instead of having the menu keeping track of whether it's open, we now
leave it up to the surrounding component to mount and unmount it. This
avoids bubbling issues when listening for events on an external toggle
button.
We also now use the recommended callback style for refs instead of
named refs.