Clean up code and documentation for glfwGetKeyScancode and add implementation for Wayland and Mir. Related to #830.