[WIP] Learning curves

This is the first version of the function `learning_curve` that has been proposed in issue #2584. I would like to get feedback and I have some questions.

* Are you happy with the interface? Is it OK to generate the range of numbers of training examples in the function and return it afterwards or does this clutter up the interface?
* Did I violate any scikit learn conventions?
* Is it the right place or should it be defined at another location?
* Where can we put the stuff that occurs in *SearchCV and in `learning_curve`?