Enable link time optimization

To enable link time optimization, several configures needs to be
changed:
1. Add -flto in Makefiles
2. Use C++17 to get inline constexpr
3. Use gcc-ar and gcc-ranlib to generate static library, otherwise it
   gets link errors.

Tested: Build OK and unit tests passes.

Change-Id: Ic58cbfb631c97f43c82d5669cbf6ac1ebc5e0ab9
Signed-off-by: Lei YU <mine260309@gmail.com>
diff --git a/Makefile.am b/Makefile.am
index fce04e0..0aadf6c 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -19,7 +19,7 @@
 phosphor_timemanager_LDADD = libtimemanager.la
 
 generic_cxx_flags = $(PHOSPHOR_DBUS_INTERFACES_CFLAGS) \
-                    $(SDBUSPLUS_CFLAGS)
+                    $(SDBUSPLUS_CFLAGS) -flto
 
 generic_ld_flags = $(PHOSPHOR_DBUS_INTERFACES_LIBS) \
                    $(SDBUSPLUS_LIBS)