Refactor generated code and update to latest glfw-rs

Reduces the size of the binary slightly by reducing and removes the uses of macros. It also brings the loader function up to date with the latest glfw-rs.