wm: Register frames early

Expose events may come as soon as we update the geometry, so
let's register with the WM before mapping the window.
Use rootWindowId
server: Register the root window early

For the same reasons as the WM -- we should "register" the root window
before it's mapped so the redrawing coed doesn't get hung up trying to
iterate over subchildren of it.
Don't only queue a redraw in the copyArea case

This seems to be an accidental indent. Move it around a bit
to be after the freeing to show it's a final step, rather than part
of the fourth step.
Move oldRegion/newRegion destruction to callers

manipulateGraphicsForWindowMoveResize doesn't own the
regions (although it manipualtes them), so it shoudn't destroy
them.
Remove an unused parameter from damage()
Add a quick comment describing child window semantics
Clear damage if the expose event was rejected

In particular, this clears damage for the root window, preventing
it from being exposed ever again.