various small cleanups and bugfixes found by checking warnings from clang
Merge branch 'lammps-icms' of bitbucket.org:akohlmey/lammps-icms into lammps-icms