For some reason, when the GamePad is created from frozen code, the
get_pressed method would always return 0. This fixes it, and makes it
work properly no matter how the object was created.
Don't check the pin's pull direction on every tick, instead cache it
at the beginning. Also avoid a "can't get pull of output pin" error
when one of the pins passed is in output mode.
The example code for the gamepad module would skip detected
button presses in the code that waits for a button to be released,
because it would run it even when no button is pressed.
Also updated the example pin names to not use RX and TX.