We call branchinfo() function into for-loops and each branchinfo() calls try to
access repo.changelog.
As D5161 introduced the functionality to pass a chnagelog into that function to
prevent accessing repo.changelog in loops, let's use that.
Timings of hg perfrevset 'branch("tip")' on hg-committed before and after:
Before
! wall 0.133497 comb 0.140000 user 0.130000 sys 0.010000 (best of 64)
! wall 0.139459 comb 0.150000 user 0.150000 sys 0.000000 (best of 57)
After
! wall 0.106518 comb 0.110000 user 0.100000 sys 0.010000 (best of 77)
! wall 0.106157 comb 0.110000 user 0.100000 sys 0.010000 (best of 83)