fix a possible deallocation bug in array.h

also delete unused variable N_ in _lbfgs.h