Branch filtering in the API for the commits index

Test Plan: make test-full

Reviewers: cramer

Reviewed By: cramer

Maniphest Tasks: T10537

Differential Revision: https://tails.corp.dropbox.com/D62520