inventory: implement serialization

Use Cereal to serialize and persist inventory items to the filesystem.
Serialize inventory objects as and when they're created/updated via the
notify() API.

Create a template API to perform serialization on the sdbusplus
inventory interface type.

An inventory item path /foo/bar/baz implementing interfaces iface1 and
iface2 would be stored in paths /foo/bar/baz/iface1 and
/foo/bar/baz/iface2.

Change-Id: I9a175185eac1740d6f2ca86a3ee13457edfc8ea9
Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
diff --git a/generated.mako.cpp b/generated.mako.cpp
index 7a9a38e..7eeb8c4 100644
--- a/generated.mako.cpp
+++ b/generated.mako.cpp
@@ -7,6 +7,7 @@
 % for i in interfaces:
 #include <${i.header()}>
 % endfor
+#include "gen_serialization.hpp"
 
 namespace phosphor
 {
@@ -27,7 +28,10 @@
                     ${i.namespace()}>>::make,
             MakeInterface<
                 ServerObject<
-                    ${i.namespace()}>>::assign
+                    ${i.namespace()}>>::assign,
+            MakeInterface<
+                ServerObject<
+                    ${i.namespace()}>>::serialize
         )
     },
 % endfor