More informative numerical error message in SGD

Also add a test.
cosmit
Merge pull request #3035 from ogrisel/test-sgd-stability-error

[MRG+1] More informative numerical error message in SGD