Bayesian estimation of past astronomical frequencies, lunar distance, and length of day from sediment cycles