Synth-by-Reg (SbR): Contrastive learning for synthesis-based registration of paired images