shards: optimize RepoBranches when all branches are the same (#54)
This is the same idea behind the optimization for reposet. We can avoid
the work of running simplify per shard if we know every shard in
filtered will be searching the same branches.