Adding regression test for the new IMAP parser.
Backport of Iac7f5c022e44ca5f06f735e145af15cc459eb61f
Change-Id: Ic84172b6793a9837c2fc4a894fee141da3d19f1d
It's a preliminary change for IMAP bug fixes.
Also,
- Fixed a potential bug in ImapFolder.setFlags where it'd throw
StringIndexOutOfBoundsException if flags is empty.
- Added a generic flag to proguard.flags so that now all methods with
the "ForTest" sufix are automatically preserved.
Turned out it wasn't needed for this CL, but it should come in handy
someday.
Bug 2538076
Change-Id: I49a08afc196c7b7f1f30477dfc38ac5381045d84