Add cross-validation to logistic regression.

Scan C parameter.

Also free some temporary variables to save memory on 32bit machines.

--CAR
Merge branch 'develop' of github.com:BBN-Q/Qlab into develop