lib: add utility

Add utility is_multiple_of_order to check if a^n = 1(mod p) for prime
p, which is a rather common thing for number theory.
132: finish