Wait for XEvents when changing window size
Fixes #259
Reading from GameWindow.ClientSize after assigning a new value to it
could often return the old value on X systems.
This was due to ClientSize being set by a ConfigureNotify event sent
by the X server that we would sometimes not during the ProcessEvents
started by the ClientSize setter (due to the asynchronous nature or
client/server).
This commit adds a way to wait for a specific event type in
ProcessEvents. Just before calling ProcessEvents in the ClientSize
setter we set the wait type to ConfigureNotify. This should ensure
that ClientSize will not return until we've received the new size of
the window from the X server and updated our internal values for the
size of the window. Thus when ClientSize is then read immediately
after it is always the new size.
It's likely that some of the other property setters we have which call
ProcessEvents need a similar fix.