The Transition from Complex Crater to Peak-Ring Basin on the Moon and Mercury: Observational Constraints on Impact Basin Formation