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/test/Makefile.am b/test/Makefile.am
index 0c14421..a8cd3b7 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -21,7 +21,7 @@
 
 test_CXXFLAGS = $(PTHREAD_CFLAGS) \
                 $(PHOSPHOR_DBUS_INTERFACES_CFLAGS) \
-                $(SDBUSPLUS_CFLAGS)
+                $(SDBUSPLUS_CFLAGS) -flto
 
 test_LDFLAGS = $(GMOCK_LIBS) \
                $(GTEST_MAIN_LIBS) \