API changes and support for GLFW 3.1 features.

This PR contains changes from the `devel` branch, and support for features to be added in GLFW 3.1.

There are minor API changes that make the API easier to use and more idiomatic. See change log in README for a complete list of changes.

It is planned to be merged into master when GLFW 3.1 is released.