lib/math: Added gcd method on Int.

Added GCD method using Stein's algorithm on Int.