MRG LibLinear class weights fix

Fixes #1411.

It seems I broke that in 5427f81c66838c92202c609e27cd92786474aa17 - or rather that I didn't fix there when I fixed it for libsvm.
The current tests for class weights seem suboptimal.
This branch contains tests for all estimators supporting class_weight.

~~I will also try to improve the tests in the svm module.
If everything works, I'll add another comment to linear.cpp.~~

~~I want to check if the corrected behavior is consistent with the libsvm binary (see comments in #1411), but I feel being consistent inside sklearn is more important any way.~~


This PR is on top of #1485 because they touch the same stuff.