COSMIT hinge_loss: better input validation

Also removed deprecated code. Fixes #1633.