http://en.wikipedia.org/wiki/Euclidean_algorithm
gcd(a, b) = gcd(b, a mod b),
https://github.com/felipernb/algorithms.js/commit/e5a04f9ad0...