Some utility functions needed for Push.

BUG=skia:

Review URL: https://codereview.chromium.org/789743003
Improvements to commits page

- Pre-load all commits on the server. This takes about 2 minutes.
- Add "load more" functionality to the commits page.
- Fix bug for the case when a branch head is not in the commits window.

BUG=skia:

Review URL: https://codereview.chromium.org/784103004