Understanding and correcting pathologies in the training of learned optimizers