xcb_send_request: Send all requests using a common internal send_request.
xcb_send_request: Send all requests using a common internal send_request.

This simplifies the critical section of xcb_send_request and fixes a
couple of subtle bugs:

- It's possible for xcb_send_request to need to issue two sync requests
  before it can issue the real request. Previously, we counted sequence
  numbers as if both were issued, but only one went out on the wire.

- The test for whether to sync at 32-bit sequence number wrap has been
  incorrect since we switched to 64-bit sequence numbers internally.

This change means that if the output queue was already full and the
current request is bigger than the output queue, XCB will do one more
write syscall than it did before. But syncs are rare and small requests
are the norm, so this shouldn't be a measurable difference.

Signed-off-by: Jamey Sharp <167c1dcbbc9c320e8e02a0c15c886204b4e658a4@minilop.net>

stapelberg/libxcb,stapelberg/libxcb,stapelberg/libxcb