Cargoify glfw 3.0.4
Merge pull request #7 from pcwalton/post-empty-event

Backport glfwPostEmptyEvent from GLFW 3.1
Added caching of X11 NULL atom.
Merge pull request #8 from csherratt/cargo-3.0.4

Added caching of X11 NULL atom.
Make the X11 implementation of `glfwPostEmptyEvent()` thread-safe.

The old code was not using `XSendEvent()` in a thread-safe manner, which could
cause messages to be corrupted. The thread-safe way to use `XSendEvent()` from
multiple threads would be to use `XLockDisplay()` and `XUnlockDisplay()` around
every call to Xlib. However, this would add unnecessary overhead to all X
communication. To avoid that, this patch changes the synchronization mechanism
of `glfwPostEmptyEvent()` on X11 from an X event to a send on a Unix pipe.
Because `glfwWaitEvents()` was already using `select()` for blocking, this
turned out to fit in quite naturally with the existing design and eliminates
the thread safety issues.