EventHook

Previously, all the event types were defined by their event-catching
procedure, which only catches a single event at a time. This will cause
problems later, when I we attempt to catch one of several types of
event.

With the new design, event types are described in terms of more general
events, and withNextEvent is defined in terms of event types instead of
the other way around.
untilEvent, exactEvent

withKeypress waits for a keydown event, then waits for the same key to
be released. Waiting for a particular event is useful in general, so
this pattern was extracted into a new event type called exactEvent.

When an exactEvent occurs, it doesn't give any new information to the
callback, it just confirms that the event has occured. Ignoring that
information is easy, but since withGlutMain was also ignoring its event,
I decided to refactor the common pattern into untilEvent, a version of
withNextEvent which doesn't pass on the event information.