imap: introduce a debug flag to bypass storage backend