Rewrote Gamepad class for better subclassing.

This will make it possible to make a ColorfulGamepad class which would
extend the Gamepad class.