Convert Prior and Random trainers to estimators as part of the API overhaul project, and write tests for the new estimators.