Persist changes to settings

Persist changes made to settings, if any, such that those changes can be
restored upon a reboot.

Use Cereal for serialization of the settings' properties. Since the
settings code is generated based on a system specific settings policy,
generate the serialization code as well such that only relevant settings
are serialized.

Resolves openbmc/openbmc#1764.

Change-Id: Id8bd84a9455cf4348b22f255d038b050d004eb7c
Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
diff --git a/settings_main.cpp b/settings_main.cpp
index 0d775e2..fbb9a0d 100644
--- a/settings_main.cpp
+++ b/settings_main.cpp
@@ -11,11 +11,10 @@
     // the object namespace and are not under a (settings) root. Hence register
     // "/" as the path.
     sdbusplus::server::manager::manager objManager(bus, "/");
+    bus.request_name(SETTINGS_BUSNAME);
 
     phosphor::settings::Manager mgr(bus);
 
-    bus.request_name(SETTINGS_BUSNAME);
-
     while(true)
     {
         bus.process_discard();