fixed bfgs to terminate if svd fails, conjugate_gradient terminates if residual_dot too low, NN_Tester class now works