Add hotplug support to the Darwin backend.
Hotplug events are handled by the async event thread. This thread listens for
two events: kIOTerminatedNotification, and kIOFirstMatchNotification. If
either of these events fires the thread will iterate through the appropriate
iterator and will either enumerate or call usbi_disconnect_device depending
on the event.
While adding hotplug support it was discovered that when reading from the IO
registry we need to use kCFNumberSInt32Type for the device location. Using
kCFNumberLongType would cause locations to be sign-extended and not match
what is stored for the session id. This is now fixed.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>