fix TypeError
Import SearchIndexCursor model too.
Optimize search time format conversion

Summary: Convert datetime to Unix timestamp at index-time rather than at search result processing.

Test Plan: Tested manually.

Reviewers: emfree

Reviewed By: emfree

Differential Revision: https://review.inboxapp.com/D877
Allow account-restricted checks with bin/inbox-syncstatus.
Improve setup.sh to avoid installing software in production.
Overhaul IMAP draft deletion.

Summary:
Basically, in order to do away with soft-deletes we have to restructure
syncback actions such that the syncback service doesn't need to access database
objects that have been legitimately deleted. So we need a strategy for deleting
drafts that were created on the remote (and hence have no X-Inbox-Id header).
Previously we'd delete the entire thread (!), which in any case is definitely
not what we want to do. Now we instead just use either the X-Inbox-Id header or
the Message-Id header to locate the message on the remote.

(This is a prerequisite to fixing T666.)

Test Plan: All manual for now.

Reviewers: kav-ya

Reviewed By: kav-ya

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