Support query parameters on /threads and /messages API queries.

Summary:
Example:
http://localhost:555/<ns_public_id>/messages?
from=christine@spang.cc&last_message_after=1398384000

Right now we're only doing exact matching on string parameters.

Relatedly:
* Fix a typo in APIEncoder (subjectdate belongs to Thread not
Message).
* Order query results by ascending ID so that windowing can work properly.

Test Plan: Experimental feature.

Reviewers: mg

Reviewed By: mg

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