Issue 48989 - Overflow in counters and monitor
Bug Description: NSPR's printf functions are only designed to work with 32bit ints,
so this causes unexpected overflows in logs, perf counters, and
monitor output.
Fix Description: Just use the standard printf functions which do work correctly
with 32/64 bit ints.
We are now using the gcc __atomic built-in functions which covers
a lot of portabilty issues between architectures, and helps simplify
the code. Replaced PRUint64 with uint64_t where needed
https://pagure.io/389-ds-base/issue/48989
Reviewed by: firstyear(Thanks!)