[MRG] update LibSVM to version 310

I cherry-picked the relevant patches from the [LibSVM GitHub repo](https://github.com/cjlin1/libsvm). I stopped at 310 because 311 introduces a `max_iter` that seems to work a bit differently from our own.