[Mac] Fixed joystick Guid calculation

The result now matches the output of SDL2 as well as the entries in the
GamePad configuration database.
[Mac] Use cookies to match HID joystick elements
[Mac] Added CFGetTypeID method
[Mac] Sort joystick elements like SDL2

GamePad configuration database is now working correctly on Mac.
[Mac] Fixed Joystick Hat calculations
[Mac] Match SDL2 element order

Joystick elements (axes, buttons, hats) are now reported in the same
order as SDL2. This fixes potential mismatches in the GamePad
configuration database.

Additionally, elements are now counted correctly (duplicate elements no
longer count towards the total.)
[Input] Added From* overloads with out parameters
[Mac] Use DeviceCollection

This reduces code duplication significantly.
Merge pull request #180 from thefiddler/mac_joystick

[Mac] Improve joystick driver