Implement audio devices and streams HAL delegating to legacy HAL

Changes made to the .hal definition:

  - introduce Effect ID returned by the IEffectsFactory that
    needs to be passed to IStream.{add|remove}Effect; otherwise
    it's impossible to retrieve the underlying HAL effect handle;

  - change "bus address" in DeviceAddress to "string" type;

  - fix signature of some methods w.r.t. returning Result;

  - remove unused "struct AudioPatch".

Bug: 30222631
Test: make
Change-Id: Icb51729ef57bb2a5b0b78609735e7481bc04f95c
diff --git a/audio/effect/2.0/default/Effect.cpp b/audio/effect/2.0/default/Effect.cpp
index 8ab0749..82d0292 100644
--- a/audio/effect/2.0/default/Effect.cpp
+++ b/audio/effect/2.0/default/Effect.cpp
@@ -23,6 +23,7 @@
 
 #include "Conversions.h"
 #include "Effect.h"
+#include "EffectMap.h"
 
 namespace android {
 namespace hardware {
@@ -45,6 +46,7 @@
 Effect::~Effect() {
     int status = EffectRelease(mHandle);
     ALOGW_IF(status, "Error releasing effect %p: %s", mHandle, strerror(-status));
+    EffectMap::getInstance().remove(mHandle);
     mHandle = 0;
 }