Wipe GestureManager state on context menu

The context menu breaks the event flow: clicking outside the document to
close it means no mouseup is ever sent to the document. This change
wipes all GM state on contextmenu events, making sure it never gets into
a bad state.