Refactor folder sync status management.

Summary:
Every sync monitor creates a single reader/multiple writer queue, which
will contain folder sync status events. The sync monitor spawns an
additional greenlet to consume the events in the aforementioned queue
(i.e., consumer greenlet). Greenlets executing the sync engine (i.e.,
producer greenlets) don't perform table (ImapFolderSyncStatus) updates
anymore; they push events to the queue, which is consumed by the
consumer greenlet that is in charge of performing table updates.

Events are tuples consisting of a folder identifier and the new state of
the producer greenlet managing said folder. The consumer greenlet keeps
a map from the folder identifier to the table (ImapFolderSyncStatus)
entry.

Test Plan:
Fire up the virtual machine, start bin/inbox-start and bin/inbox-auth to added
a few accounts. Start bin/redwood-start admin and double-check that folder sync
status gets changed from 'initial' to 'poll'.
This set of changes should not modify the behavior of inbox as a system.

Reviewers: khamidou, emfree

Reviewed By: emfree

Differential Revision: https://review.inboxapp.com/D656
Fix for ArcanistBaseUnitTestEngine deprecation.

Summary:
As reported in https://secure.phabricator.com/D9983 arcanist deprecated
a few base classes. Among them there is ArcanistBaseUnitTest, which we
were using.

As suggested by arcanist itself, PytestTestEngine now extends
ArcanistUnitTestEngine instead of ArcanistBaseUnitTestEngine.

Test Plan:
Checkout 52947cfd92b331916adffa1ff3233546446c881b for arcanist and
43a0b6d17bb097d76ef5ef936c91fa7448212cc2 for libphutil to see the warning
message from arcanist.
This patch removes the warning message.

Note: this patch may require all the developers to update their version of
arcanist and libphtil.

Reviewers: emfree

Reviewed By: emfree

Subscribers: spang, khamidou, kav-ya, emfree, dlitz

Differential Revision: https://review.inboxapp.com/D665
-clear out pyc files and chown source dir to admin in Dockerfile
-attempt to grab mysql host/port info from docker link env vars before falling back to config file