Homestyx hydra

R1:e28b78f5ebe3

Fix two issues with ref discovery

Summary:
See IRC. I'm having trouble figuring out what's going on with b4taylor's report, but fix two possible issues:

# The commit query is missing a `repositoryID`, which could cause issues if you import two copies of the same repository.
# I think we may try to close commits on untracked branches right now, as long as they aren't excluded by other autoclose rules.

Test Plan: Ran `bin/repository refs` on a few repos.

Reviewers: btrahan

Reviewed By: btrahan

CC…
Repository: R1 hydra
Commit Date: Feb 28 2014