Mac joystick: ignore duplicate HID elements.

The DualShock 4 has all elements listed twice: once in the top-level list of
 elements, and once in an "Application Collection" element at the top-level.

Each element has a proper cookie with a unique value, so now we descend into
 each element collections, but before we add an element to the device's list,
 we make sure we don't already have one with that cookie, probably from
 another collection or a buggy device.

--HG--
extra : rebase_source : 0e5058ff3333364e680eb79d3cbcfa168ab2a068
Fixed Mac DualShock 4 gamecontroller db entry again.

--HG--
extra : rebase_source : 1eeb30a0022d817a68f91b7fad1025a7e8a8e24d