The genetic consequences of habitat fragmentation: the case of forests