Refactor, and fix a few bugs in the management of UIDevices.
A bit more cleanups now that !25 (merged) is in.
This MR mostly does three things:
-
Track the visibility of UIDevices to clients separately from
port-available
by using a newavailable
property, this is a bit of a refactor that will allow bindingavailable
and therefore visibility to more factors later. -
Refactor the cleanup code for UIDevices to make sure they get removed properly
-
Use a device ID of
0
when the active input or output changes to a device that we hide from clients (instead of using a device-id the clients don't know about).