soundtrigger: Refactor the default implementation to be extensible

Introduce an inner "trampoline" class that implements
ISoundTriggerHw. This allows minor uprev implementation to inherit
from SoundTriggerHalImpl and reuse its functionality.

Split SoundModelClient into an abstract common part and
version-specific part. This allows the client to be redefined for
the types used in callback interface extensions.

Split the impl library into "core" part and the part implementing
HIDL_FETCH_ISoundTriggerHw function to avoid clash with the same
function introduced in minor uprev implementation.

Bug: 68823037
Change-Id: Ibec647f1aa7bc6a2a0bdfd1c9f9a066e4779a1bf
Test: make
diff --git a/soundtrigger/2.0/default/FetchISoundTriggerHw.cpp b/soundtrigger/2.0/default/FetchISoundTriggerHw.cpp
new file mode 100644
index 0000000..bd99221
--- /dev/null
+++ b/soundtrigger/2.0/default/FetchISoundTriggerHw.cpp
@@ -0,0 +1,23 @@
+/*
+ * Copyright (C) 2018 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "SoundTriggerHalImpl.h"
+
+extern "C" ::android::hardware::soundtrigger::V2_0::ISoundTriggerHw* HIDL_FETCH_ISoundTriggerHw(
+    const char* /* name */) {
+    return (new ::android::hardware::soundtrigger::V2_0::implementation::SoundTriggerHalImpl())
+        ->getInterface();
+}