The evolution and breakdown of S-allele systems