[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.