WIP: score functions with support for sample weights

Grid searching also supports sample weights.

This PR should only be merged after scikit-learn#522.