[MRG] Learning curves

This is the pull request for the function `learning_curve` that has been proposed in issue #2584. I would like to get feedback on the interface and code.

Here is an example with naive base on the digits dataset:

![learning curve](http://www.informatik.uni-bremen.de/~afabisch/files/nb_digits_learning_curve.png)