Add support for ghost atoms with PIMD

This adds a check for ghost atoms, only applies initial spread to non-ghost atoms and calculates ghost positions afterwards.