Reduce autorelease pool scope, run makeKeyAndOrderFront on main thread.

This makes autorelease pools so they are only active for GLFW code. When GLFW is used inside a Cocoa app, other code may allocate and it causes problems if the those allocations use the GLFW pool.

This also runs makeKeyAndOrderFront on the main thread. This stops a crash when the GLFW thread is not the main thread.