Make UngrabPointer do nothing when we have no grab
Only ungrab when we take a passive grab

If a client takes an active pointer grab, clicking shouldn't
ungrab.
Rename syncCurrentWindow

We renamed the variable a long time ago.
Don't take a grab on button click if we already have one
Eliminate a race condition when images are fast to load

If images are fast to load, it may happen that the load signal is
emitted before we connect to it, which means we won't properly
initially draw the windows.
Don't cause redraws when an unmapped window gets reshaped
Fizzle out draw requests from unmapped windows.
Send DestroyNotify before unparenting the window
Fix the filtering of substructure* masks

These should only work for the immediate parent of a window.
Fizzle out expose events that happen before our image is loaded

Async is awesome. Causing the image to load invalidates the window,
so we should always get another expose after the image is loaded.
Remove the mainloop from the server

Now that we have an async event sending mechanism, we should queue
expose events immediately to the client.
Remove some debug code and clean up
Remove the global damage region

This makes it much more correct and easy to implement
proper drawing semantics. As damage is tracked per-client,
this means that we won't have to copy parts of the global
damage region around.
Remove debug

It's limited use to us now, and it's getting harder to implement
properly.
Fix redraws by damaging after copying

Now that we draw the background immediately, we need to do the copy
first.
Consolidate setWindowShapeRegion/_configureWindow

We could probably consolidate these more by having
_configureWindow just set the shape region, but oh well.
Fix a memory leak

We need to ensure that oldRegion is destroyed.
Move the helper wrapper on window changes so that it's used by ServerWindow

This helps consolidate a lot more code, and we clean up our API as well.
Don't require clients to pass their client to the server

Turn the PublicServer into a thing that's per-client, so that
each client has its own "connection". In the future we'll try
to turn this into a postMessage socket thing.