Generalized solutions to opinion dynamics models with discontinuities