Ecological and epithelial regulation of immunity in the female reproductive tract