fix more issues from clang(++) and cppchecker

Here another set of patches to fix issues found by clang/clang++ and cppcheck. As already send to the ceph-ML for review. Doesn't contain the 2 patches sage commented on (01/15 and 13/15).

Please pull from wip-da-sca-cppcheck-clang.