Split SharedSpan out into a header

We were using it in enough spots it deserves a header.

Change-Id: I0b9ea59d390dac2406195d763c7a680c7004e7b7
Signed-off-by: James Kuszmaul <james.kuszmaul@bluerivertech.com>
diff --git a/aos/flatbuffers/BUILD b/aos/flatbuffers/BUILD
index 0f25875..e4f7d1d 100644
--- a/aos/flatbuffers/BUILD
+++ b/aos/flatbuffers/BUILD
@@ -28,6 +28,7 @@
     target_compatible_with = ["@platforms//os:linux"],
     visibility = ["//visibility:public"],
     deps = [
+        "//aos:shared_span",
         "//aos/containers:resizeable_buffer",
         "//aos/ipc_lib:data_alignment",
         "@com_github_google_flatbuffers//:flatbuffers",
diff --git a/aos/flatbuffers/base.h b/aos/flatbuffers/base.h
index b3c3ef0..a98d730 100644
--- a/aos/flatbuffers/base.h
+++ b/aos/flatbuffers/base.h
@@ -18,11 +18,9 @@
 
 #include "aos/containers/resizeable_buffer.h"
 #include "aos/ipc_lib/data_alignment.h"
+#include "aos/shared_span.h"
 
-namespace aos {
-using SharedSpan = std::shared_ptr<const absl::Span<const uint8_t>>;
-
-namespace fbs {
+namespace aos::fbs {
 
 using ::flatbuffers::soffset_t;
 using ::flatbuffers::uoffset_t;
@@ -343,7 +341,6 @@
   T t;
 };
 }  // namespace internal
-}  // namespace fbs
-}  // namespace aos
+}  // namespace aos::fbs
 
 #endif  // AOS_FLATBUFFERS_BASE_H_