Improve performance of ReceiveCommits for repos with many refs

Commit 2fbea6c already improved performance of ReceiveCommits for repos
which have a lot of refs (>100000). In this case adding all existing
refs to RevWalk's as "uninteresting" caused performance problems. But
there was another place in ReceiveCommands where we added all existing
refs as uninteresting: in validateNewCommits(). This commit improves
the performance of this method in the same way as it was done in
2fbea6c.

Change-Id: I1ce6e4198daeabbcf5b8da61e6209b45672eb4be
1 file changed