Sexual conflict and the alternation of haploid and diploid generations