Gamepad API changes.

Test added to tests app, all existing samples should still run.
Tested on Windows and BlackBerry.
MacOS platform support is still missing.