Add torch_checkpointing save config plumbing (#4058)