Restore code to optionally checkpoint/dump memory during recording.

Resolves #1142.  Checksumming is broken for another reason, but now checksums are being written during recording.