Multitype randomized Reed–Frost epidemics and epidemics upon random graphs