Generalized kinetic theory approach to modeling spread and evolution of epidemics