PG-PuReMD: clean-up MPI custom datatype initialization and error reporting. Avoid truncations in buffer size calculations. Other code clean-up.