mp_integer: implement ipow_subs.