Backport glfwPostEmptyEvent from GLFW 3.1

Backport from GLFW 3.1, with a bug relating to autorelease pools fixed.

This is needed for Servo off-main-thread compositing to work right. You can't poke the main event loop from another thread any other way, and if you can't kick the main loop awake from another thread the browser is just broken.