Ensure glfwInit is only called once and glfwTerminate is called even after task failure.

This removes the need for the separate `glfw::terminate` function. `ffi::glfwTerminate` is *guaranteed* to run once at the end of shut down because it is queued using `std::rt::at_exit`.
Merge pull request #94 from bjz/sync

Ensure glfwInit is only called once and glfwTerminate is called even after task failure.