Update residue_ntheory.py

simple patch to use optimized pow(a,x,n) for a**x % n, makes it MUCH faster for big numbers