The origin and structure of fungal disease resistance genes in plants