New joystick API.
Fixed warnings.
Added missing free of value arrays.
Fixed handling of POVs on OS X.