audio policy: allow direct outputs for dynamic audio policies

Add support for direct outputs with RENDER audio policy mixes.
A mix of type render can be registered even if no corresponding
output is opened to reach targeted device provided a direct output
profile exist for this device.

Also:
- Fix setUidDeviceAffinities(): was not closing direct outputs
opened by checkOutputsForDevice() and was not re-evaluating routes

- Fix removeUidDeviceAffinities(): was not re-evaluating routes

- Implement consistent sanity checks on selected devices in
setUidDeviceAffinities(), setUserIdDeviceAffinities() and
setPreferredDeviceForStrategy().

- Fix onNewAudioModulesAvailableInt(): attached devices reachable only
via direct outputs were not loaded.

Bug: 130296239
Test: AudioHostTest
Test: AudioServiceHostTest
Test: audiopolicy_tests
Test: manual test: Auto projection over USB, screen mirroring
Change-Id: I54470b61b4bc7e041e3a295764d368c5ded21268
4 files changed