Ancestral inference from gene trees in subdivided populations