Endemic thresholds and stability in a class of age-structured epidemics