Population genetics of insect immune responses