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
(cherry picked from commit 0d26b7fd30f8c094d9ba3e7aa25398eef23b4c32)

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

- Fixed schema versions.
(cherry picked from commit 27f9be06546c5b5ca77948d0856c70ca6644867b)