cidb: Method for fetching latest build requests

This uses the self-join method described here:
  https://stackoverflow.com/a/7745635/219138

Also add latest build requests method to fake_cidb.
BUG=chromium:793042
TEST=None

Change-Id: I6629aa36c85bfea7fb90fb4fe187291c4a0e625c
Reviewed-on: https://chromium-review.googlesource.com/914820
Commit-Ready: Paul Hobbs <phobbs@google.com>
Tested-by: Paul Hobbs <phobbs@google.com>
Reviewed-by: Paul Hobbs <phobbs@google.com>
4 files changed