Make Bluetooth LE multi-advertising testable

This patch turns the code that manages LE multi-advertising into the
BleAdvertisingManager class. All HCI calls made by this code were
abstracted into BleAdvertiserHciInterface.

Thanks to those changes, we can mock BleAdvertiserHciInterface and test
the advertising manager.

The BleAdvertisingManagerTest, still has some dependencies on other
code from the "stack" module. These have to be implemented on top of the
test file. In the future, this dependencies should be replaced by mockable
classes.

Test: Tests covering the change are added in this patch.
Bug: 30622771
Change-Id: I4a363678815c235ee01255f462db2a671ef89610
diff --git a/system/stack/BUILD.gn b/system/stack/BUILD.gn
index 7dc6165..f0ab781 100644
--- a/system/stack/BUILD.gn
+++ b/system/stack/BUILD.gn
@@ -151,7 +151,6 @@
     "sdp",
     "smp",
     "srvc",
-    "//osi/include",
     "//btcore/include",
     "//vnd/include",
     "//vnd/ble",
@@ -172,3 +171,42 @@
     "//third_party/libchrome:base"
   ]
 }
+
+executable("stack_unittests") {
+  testonly = true
+  sources = [
+    "test/ble_advertiser_test.cc",
+    "test/stack_a2d_test.cc",
+  ]
+
+  include_dirs = [
+    "include",
+    "//",
+    "//audio_a2dp_hw",
+    "//bta/include",
+    "//bta/sys",
+    "//btcore/include",
+    "//embdrv/sbc/encoder/include",
+    "//hci/include",
+    "//include",
+    "//stack/a2dp",
+    "//stack/btm",
+    "//stack/include",
+    "//third_party/tinyxml2",
+    "//udrv/include",
+    "//utils/include",
+    "//vnd/include"
+  ]
+
+  deps = [
+    ":stack",
+    "//osi",
+    "//btcore",
+    "//device",
+    "//hci",
+    "//main:bluetooth.default",
+    "//third_party/googletest:gmock_main",
+    "//third_party/libchrome:base",
+  ]
+}
+