[MRG+2] Enable grid search with classifiers that may fail on individual fits.

Supersedes #2587. The old pull request was so outdated (and the functionality affected was moved to different files) that I decided to re-do the work starting with a fresh checkout from master. Since this is technically a new branch, I'm opening a new pull request.