The distribution of residues in a polypeptide sequence is a determinant of aggregation optimized by evolution