avutil/mathematics: speed up av_gcd by using Stein's binary GCD algorithm