When a large number of commits need to be marked as published, issue the lookup query in chunks
Summary: See PHI1474. This query can become large enough to exceed reasonable packet limits. Chunk the query so it is split up if we have too many identifiers.
Test Plan: Ran bin/repository refs ... on a repository with no new commits and a repository with some new commits.
Differential Revision: https://secure.phabricator.com/D20853