add function reset() to c++ lbfgs

add tests as well