handle ButtonPress events with child != XCB_NONE (Thanks xeen)

The X11 protocol description states:

  The window the event is reported with respect to is called the event
  window. The event window is found by starting with the source window
  and looking up the hierarchy for the first window on which any client
  has selected interest in the event.

For the case of urxvt with URxvt.internalBorder > 0, urxvt sets up a
subwindow for its actual contents that is placed “in the middle” of the
urxvt window. In terms of the X11 protocol, the source window is urxvt’s
window, but urxvt does not select ButtonPress events for that.
Therefore, X11 will go up in the hierarchy and deliver the event to i3
for i3’s window decoration, even though this was not actually a click on
the decoration, but into the managed window.

Therefore, we check whether child != XCB_NONE for clicks on window
decorations and then handle them as a click inside the window.

fixes #1176
t/130-close-empty-split: clean up old workspace

This hopefully increases the reliability of the test. Empty containers
created by “open” sometimes get spurious UnmapNotify events, and in at
least one run, this test failed because of such an event.
Improve drag_pointer error handling

Log errors generated by failed pointer grabs and ungrab the pointer
after failed keyboard grabs.