Avoid the use of abs64 in timedata
Summary:
Issue core#20135:
When extending the test/fuzz/integer fuzzer I noticed the following UBSan warning when fuzzing abs64(...):
runtime error: negation of -9223372036854775808 cannot be represented in type 'int64_t' (aka 'long'); cast to an unsigned type to negate this value to itselfTypically abs(I n) type functions are not defined when n == std::numeric_limits<I>::min() so it could be argued that this is expected, but perhaps the function could be rewritten in a way which guarantees that it gives the same behaviour across systems (instead of UB).
This is a backport of core#20141
Test Plan: ninja all check-all
Reviewers: #bitcoin_abc, majcosta
Reviewed By: #bitcoin_abc, majcosta
Differential Revision: https://reviews.bitcoinabc.org/D10460