Creating branches has become a very heavy operation for Gerrit on large Gits with many change-refs. By only taking R_HEADS/R_TAGS/REFS_CONFIG into consideration when checking commit connectivity, the creation time went from 50 seconds to 3 seconds (creation initiated using the UI) on a git with 158k refs (143k refs from patch sets). Change-Id: I386f3456b35c28ffa6580cafbe6901c5d420a47d