Fix deallocation order bugs.
s/enqueue/enqueueWrite s/isQueueEmpty/isWritePending
Added interface for X_Window so that main loop can drive others.
Changed suffixes: .hpp/.cpp -> .hxx/.cxx
A little code gardening.