TST grid search/randomized search on non-BaseEstimator

See #1265.