Wrapper mechanism refactor making the API somewhat safer

Instead of retaining a pointer to an MLBase instance in ml_base, we provide pure virtual functions in ml_base that return references to an MLBase instance.

The sam pattern is used for ml_classification_base and ml_regression_base.