Evolution of uni- and bifactorial sexual compatibility systems in fungi