Resolved a number of compilation issues.
LSO seems to be working; minor bugfix

Code still needs to be cleaned up, debugging stuff deleted, etc., but there's
pretty good agreement between LOO and LSO on test data sets, which gives me
confidence that LSO is working.

A bug in LOO got fixed: the last observation never was being predicted.  This
would not generally change the optimal number of components, or generally have
a big effect on the RMSEP, but it's not how the algorithm is supposed to work.

Also quite a bit of refactoring in order to reduce redundant code.