Force static flatbuffer memory to be aligned

For buffers which required lots of alignment, we were allocating more
space than needed, and manually aligning inside that space.  That
doesn't have a good enough contract to ensure that if the flatbuffer is
loaded back into RAM, it would still be aligned well enough for the
requirements.

Instead, we need to push the alignment requirement out to the allocator,
and then make sure we stay aligned inside the buffer.  The std::vector<>
allocator isn't guarenteed to be aligned, so switch everything over to
the AlignedVectorAllocator instead which is aligned.

Change-Id: Ice2aa1316914472f2a3d55f470a4dc957e2caa3c
Signed-off-by: James Kuszmaul <james.kuszmaul@bluerivertech.com>
diff --git a/aos/json_to_flatbuffer.h b/aos/json_to_flatbuffer.h
index deafaa7..f83bab9 100644
--- a/aos/json_to_flatbuffer.h
+++ b/aos/json_to_flatbuffer.h
@@ -43,7 +43,7 @@
 inline fbs::Builder<T> JsonToStaticFlatbuffer(const std::string_view data) {
   const aos::FlatbufferDetachedBuffer<typename T::Flatbuffer> fbs =
       JsonToFlatbuffer<typename T::Flatbuffer>(data);
-  fbs::Builder<T> builder(std::make_unique<aos::fbs::VectorAllocator>());
+  fbs::Builder<T> builder(std::make_unique<aos::fbs::AlignedVectorAllocator>());
   CHECK(builder.get()->FromFlatbuffer(&fbs.message()));
   return builder;
 }