libaudiohal: Optimize loading for minor version upgrades

Make libaudiohal@7.1 to contain clients for core HAL
V7.1 and effect HAL V7.0. This is to avoid loading
both libaudiohal@7.1 (for core) and libaudiohal@7.0
(for effects).

Update the loader to figure out maximum minor version
and only load the library for that version.

Implemented proper conversion for the Result type
from the a.h.audio.effect library.

Bug: 219730472
Test: adb shell dumpsys meminfo
Change-Id: I44dd6c77505f6bbf8897e10b083e99e36730b43d
diff --git a/media/libaudiohal/impl/EffectHalHidl.h b/media/libaudiohal/impl/EffectHalHidl.h
index 07745db..e139768 100644
--- a/media/libaudiohal/impl/EffectHalHidl.h
+++ b/media/libaudiohal/impl/EffectHalHidl.h
@@ -23,6 +23,8 @@
 #include <fmq/MessageQueue.h>
 #include <system/audio_effect.h>
 
+#include "EffectConversionHelperHidl.h"
+
 using ::android::hardware::EventFlag;
 using ::android::hardware::MessageQueue;
 
@@ -31,7 +33,7 @@
 
 using namespace ::android::hardware::audio::effect::CPP_VERSION;
 
-class EffectHalHidl : public EffectHalInterface
+class EffectHalHidl : public EffectHalInterface, public EffectConversionHelperHidl
 {
   public:
     // Set the input buffer.
@@ -77,8 +79,6 @@
     EventFlag* mEfGroup;
     bool mIsInput = false;
 
-    static status_t analyzeResult(const Result& result);
-
     // Can not be constructed directly by clients.
     EffectHalHidl(const sp<IEffect>& effect, uint64_t effectId);