Test: Add test for BarzilaiBorwein
BarzilaiBorwein: Handle convergence gracefully

z `dot` z converges to zero as we approach the optimum, leading to
diverging alphas. Terminate the iterations when this happens