Add a basic &view=count parameter

Summary:
I decided to break implementing "view=count" into three subtasks:
- the one you're reading now
- adding a "view=ids" to display a list of ids
- defining a set syntax for parameters "+", "^", "-".

This diff adds support for "view" parameter wherever it makes sense. Also not that there's places where the code returns directly a dict to serialize. This is because the python json library doesn't let us override how basic types (int, long, etc.) get serialized.

Test Plan: Tested that it worked for /threads and /messages

Reviewers: emfree

Reviewed By: emfree

Subscribers: mg, bengotow

Projects: #inbox-api

Maniphest Tasks: T324

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