Cleanup and fixes for gcd and xgcd, plus better documentation and tests.
Added nn_set_str and test code.
Merge branch 'v0.35'