Properly implement gamepad support

buttons, sticks. No d-pad or triggers yet. Lots of vector functions to
make things easier too.