Prince William played ‘crucial role’ in decision to strip Andrew of royal titles