moved options for linesearch into bfgs/lbfs, fix squaring of linesearch
steps

It was too confusing having linesearch options hidden in a member class
so now the LBFGS/BFGS classes have their own version of the linesearch
parameters that are initialized at the start of optimization.

There was an issue with how the stop distance was computed (I was
squaring that because I wanted to use the squared norm for stopping)