Evolution of habitat-dependent sex allocation in plants: superficially similar to, but intrinsically different from animals