Check that the chosen counts store is not too old wrt the other stores/log

- fix: when writing the new counts store make sure we pad with zeros up to the length of the file
Code cleanup and documentation
Record size should be a parameter to the generic KV-store
KeyValueRecordVisitor should accept a register from outside rather than allocate one itself