Rewrite the mvalib.prepare and base it off a class.

The interface has to be more flexible due to new requirements (using completely
different samples for training and testing). Replace the function with a class,
that can be used to set up and execute the preparation of training samples.