Sped up mulmod functions and added fast powmod which takes normalised n.
Added test code for new powmod function.