Move checkpointing to the beginning of the MD step
The checkpointing in md.cpp is done towards the end of the step, together with the trajectory output. If would simplify the code to do it at the beginning of the step, although this could lead to duplicate communication of x and v when they are also written to trajectory and/or confout.gro. We could optimize this by assuming we have the global state at a checkpointing step.
When/after doing this, some modules can be simplified which have already updated (part of) their state at the current checkpoint call in the loop. Intermediate storage of those state entries can be removed.