lib: fix bug in modulo lib

The parameter "a" passed into inverse could be negative, but bezout
implementation only allow positive input. So "a" needs to be made
positive first.
lib: fix arith_t type in modulo lib

External arith_t controled by macro is impossible, due to the following
reason:

When modulo.cpp file is compiled, it has no idea that, say,
seperately into its own .o file), so compiler will use the default
signed int (since no customization macro appears to be defined).

If it were in C, a type conflict is detected. But in C++ symbols can be
overloaded, that is to say, compiler assumes that inverse(long long,
long long) and inverse(int, int) are different symbols. So the
customized inverse(long long, long long) symbol cannot be found in
linking stage.
381: finalize (correct)