Update API terminology.

Summary:
This commit makes the following changes to the API:

* Rename the 'namespace' attribute of all objects to 'namespace_id'.
* Rename the 'thread' attribute of messages and drafts to 'thread_id'
* Rename the 'messages' and 'drafts attributes of threads to 'message_ids' and
  'draft_ids', respectively.
* Rename the 'thread' query parameter for filtering messages and drafts to
  'thread_id'.

The point is to consistently differentiate id fields from actual object
representations in the API.
Fixes T316.

Test Plan: Run unit tests, grep docs.

Reviewers: bengotow, kav-ya

Reviewed By: kav-ya

Maniphest Tasks: T316

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