Merge "Fix issue found by FindBugs"
Merge "Tests for IMAP FETCH"
More test for ImapStore/ImapFolder.

- Also, fixed a potential crash in getMessages().
  It could happen when a client is gettign a message list while
  another client is removing messages.

Change-Id: I04b1de6bc384cffb7a5286bcec0a349a3d62a623
Allow limited looping requests in sync

* Microsoft has documented cases in which the server can continue to
  send MoreAvailable=true even when no new data is received.  This
  can cause looping behavior, which we stop when we recognize it.
* This workaround, however, can prevent the situation from resolving
  itself, and lead to delayed sync (up to a few hours has been noticed)
* In this limited CL, we allow the sync to loop up to a maximum number
  of times before stopping it forcibly.

Bug: 2685984
Change-Id: I85981b85b71c4e7d53e69da2520543e8ef04c889
More tests for IMAP, clean up, and a few bug fixes.

- A few new tests in ImapStoreUnitTests.
- Added TODOs to ImapStoreUnitTests (for mainly NO response handling)
- Renamed ImapStore.releaseConnection to poolConnection.
- Fixed a bug in getConnection where it'd return a closed connection.
- Now getConnection() hanles BYE response for NOOP correctly and treat the
  connection as closed.

Change-Id: I48e5b89049338f7d4f1ac77cd7ac7243945a9575
Merge (-sours) commit 'cbe4ae9291160877f6664289e3713d5ef792bca5' into oxygen_1005

* commit 'cbe4ae9291160877f6664289e3713d5ef792bca5':
  More tests for IMAP, clean up, and a few bug fixes.
  More test for ImapStore/ImapFolder.
Merge (-sours) commit 'e034a5e36621072d81b3d3a85b9706c5ae0e5387' into oxygen_1005

* commit 'e034a5e36621072d81b3d3a85b9706c5ae0e5387':
  Allow limited looping requests in sync