Fixed testgamecontroller output to make sense.

--HG--
extra : rebase_source : 88c573edaf1da2153ada5b4f2c6893e91add2310
Better XInput detection code for DirectInput device enumeration.

This code is way faster than the Wbem code, and less ugly.

--HG--
extra : rebase_source : cce46397251068b426e2ec267c15292aa0744386
Reworked XInput and DirectInput joystick code.

Now multiple XInput controllers map correctly to device indexes instead of grabbing
the first available userid, and are completely separated out from DirectInput.

Also, the hardcoded limitation on number of DirectInput devices is gone. I don't
expect there to really ever be more than eight joysticks plugged into a machine, but
it was a leftover limitation for a static array we didn't actually use anymore.

Fixes Bugzilla #1984. (etc?)

--HG--
extra : rebase_source : 103ce667c1cdd87a3691c9dd9eea2318bad908c8