REST API /changes/: implement server

Implement a new JSON based REST API to query for changes that are
visible to the user, and replace the current query RPCs with this
new REST based implementation that is built on QueryProcessor.

The eventual goal of this new endpoint is to provide all of the change
information needed to show search results, a user's dashboard, or the
change detail page describing a change. Patch level information to
view a file's actual lines of code will probably be deferred to a new
endpoint that has not yet been written.

The query string is taken from the "q" query parameter, for example,
this URL shows "tools/repo status:open", matching any open change
whose project name contains the string "tools/repo":

$ curl 'http://localhost:8080/changes/?q=tools/repo&n=2&format=JSON'
)]}'
[
  {
    "project": "tools/repo",
    "id": "I37f758e238c2dbc891a0d876547cb7acc29fc7f7",
  },
  {
    "project": "tools/repo",
    "id": "I340b5a3aab999850acf43856a46671f02ef9ae22",
  }
]

More complex queries can be passed in the query parameter:

  /changes/?q=status:open+is:watched&n=2&format=JSON

Change output is sorted by the last update time, most recently
updated to oldest update.

If the n query parameter is supplied and additional changes exist
that match the query beyond the end, the last change object has a
"_more_changes: true" JSON field set. Callers can resume a query
with the N query parameter, supplying the last change's _sortkey
field as the value. When going in the reverse direction with the
P query parameter puts "_more_changes: true" in the first change
object if there are results *before* the first change returned.

Change-Id: Ib9378b1b138ad923f7b6699ccfad797e5c8606ae
6 files changed