[SPARK-3106] Fix the race condition issue about Connection and ConnectionManager

This is incorrect change.
Any of those methods can throw an exception - leaving Connection.closed as false.

What is the point of the synchronized btw ? None of the other methods are protected by this lock