Fix automatic setup of class weights.

Automatic setup of class weights works only when the classes are numbered by {0, 1, .., n-1}. For this case the mapping done on sklearn/svm/base.py#141 by a call to unique(y, return_inverse=True) is identity.

For classes numbered differently (eg. just shifting the target), the class weights setup causes division by zero and subsequent mediocre performance of the classifier (prediction of a single class).