Merge #22215: have the smtplib 'quit' command reset the state.