Removes the check of NaN when sdCorr is averaged by rho

Let sdCorr be NaN rather than zero should be more informative
Fixes a COM calculation bug in spatialDecompose_mpi.f90

and makes some small improvements in codes.
Merge branch 'fixSD-COM'