Inferring the demographic history from DNA sequences: An importance sampling approach based on non-homogeneous processes.