[llvm-cov][gcov] Optimize the cycle counting algorithm by skipping zero count cycles
This change is similar to http://gcc.gnu.org/PR90380
This reduces the complexity from exponential to polynomial of the arcs.
Reviewed By: MaskRay
Differential Revision: https://reviews.llvm.org/D93036