[IMAPx] Fix a concurrent message download issue
When there had been two requests to download one message at the same time the later waits for the former to finish, then it reads the message from the local cache. The problem is that the later can use the same stream as the former, but this stream is re-winded at the end, thus the later attempt doesn't read anything and produces basically empty message, instead of the proper content. This could be sometimes observed when viewing message source of a message which was not downloaded yet.
Showing with 34 additions and 22 deletions