Fixes https://github.com/spring-projects/spring-integration/issues/2471
Call `close()` on the client whenever the connection is lost or can't be
established, to release resources in the client.
**cherry-pick to 5.0.x, 4.3.x**
(cherry picked from commit f9cea64)
# Conflicts:
# spring-integration-mqtt/src/test/java/org/springframework/integration/mqtt/MqttAdapterTests.java