Theoretical foundations for quantitative paleogenetics