381: include prime and modulo lib

This problem relies extensively on primes and inverse. Also moved 381.c
to 381.cpp since prime library is in C++.
lib: add modulo.cpp

C++ version of the modulo.h implementation (in fact only a copy of
modulo.c, named as .cpp).
Merge branch 'master' into 381

New file in the library: modulo.cpp.