Fix and lint tests in tests/imap.

Summary:
 * Add missing imports.
 * Don't expect API method return values to be jsonified.
 * Update auth token in test DB dump.
 * Update test_actions_syncback.THREAD_ID to a value that works with the actual
   state of the test account (previously, it corresponded to a thread that
   seems to have been deleted).

Test Plan: ./runtests --all

Reviewers: spang

Reviewed By: spang

Differential Revision: https://review.inboxapp.com/D113