[C++ API Parity] Add xor_convergence test for lbfgs (#35001)
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/35001
Differential Revision: D20524479
Pulled By: anjali411
fbshipit-source-id: 3413779676ab95c1ee82298f95d3441a89873107