MULE-6737: Application with IMAP connector doesn't undeploy

- Fixed concurrency problem on the RetrieveMessageReceiver when trying to undeploy an application.
(cherry picked from commit 16857ee20c4f1e4c3d3211c103c62585d029fa07)

Conflicts:
	transports/email/src/main/java/org/mule/transport/email/RetrieveMessageReceiver.java
	transports/email/src/test/java/org/mule/transport/email/functional/AbstractEmailFunctionalTestCase.java