Inferring the timing and strength of natural selection and gene migration in the evolution of chicken from ancient DNA data