Removed diverging commit count calculation from Repository#build_cache
Using a repository with 1000 branches the old Repository#build_cache
method would take around 180 seconds to complete. Without calculating the diverging commit counts this method "only" takes around 60 seconds.
See commit 28cc2413eb5ddf920ce0b5eed803121f8b884754 for more details. This fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/14058
cc @rspeicher