(#2939) - refactor checkpointer to own file

I think it's cleaner to have it in a separate file.