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