Consequences of population structure for sex allocation and sexual conflict