libaudiohal@aidl: Fix callbacks handling

- Ensure that 'StreamOutHalInterface' slice pointer is used
  by all parties.
- Handle state changes in StreamHalAidl.
- Pace stream state queries by the buffer duration (for sync
  modes) or by a fixed amount (for async) and allow it in
  any state and from any thread.

Bug: 300416194
Bug: 331300943
Test: mp3 and ogg offloaded playback (bug repro steps)
Change-Id: I953cfc8862aa466d17f7992df052b7b68fb97e0a
3 files changed