Estimating mating system and gene flow in plants, with special emphasis on trees