Tidal friction and the early history of the Moon's orbit