Support webkit gamepad api

This looks fishy. I understand that the returned array would be sparse, and indices that correspond to disconnected gamepads would containd undefined. Returning the length as the first index of undefined might skip ones further in the array?