INT-3536 Fix Mail Receiver Regression Issue

JIRA: https://jira.spring.io/browse/INT-3536

The fix for opening multiple IMAP connections in the idle
adapter inadvertently removed the check for the store being
open.

Add `connectStoreIfNecessary()` and test case.

__cherry-pick to 3.0.x, 4.0.x__