[MRG]Added has_fit_parameter method

Fixes #3711 
Ping @mblondel 
Basic rule in programming: never repeat the same thing twice. Refactor this into a private method `_check_sample_weight` and call the method in the classifier and regression classes.