A Matching-Allele Model Explains Host Resistance to Parasites