[MRG+1] LDA refactoring

OK, here is a new version of the LDA class with (optional) shrinkage. The one in #3105 was already very messy, so I thought I'd start from scratch. By default, nothing has changed and the old SVD-based code is used.