cmake: link libcommon with libstdc++ statically if WITH_STATIC_LIBSTDCXX
this matches the linkage of libceph-common, because valgrind reports
Leak_StillReachable if daemons are linked against libceph-common, will
link daemons against common instead, and let common link libstdc++
statically, if WITH_STATIC_LIBSTDCXX=ON.
this change also reverts
e6695bb6
Fixes: http://tracker.ceph.com/issues/22438
Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit
df9a59894291fe81e727babb631fb0e23cd1bbb0)