feat(numerics): add gcd and extended gcd templates (for primitive types)

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>