scorer: add sample_weight support

This is part of the larger #1574 and adds support for sample weights in the scorer interface.