Avoid signed overflow in format_time_interval, add unit tests
I've discovered a signed overflow in format_time_interval while writing unit tests for it.
The signed overflow occurs when the function takes the absolute value of LONG_MIN (which is unlikely in practice). To avoid the overflow, I've patched it to use LONG_MAX when format_time_interval is passed LONG_MIN. (This doesn't change the output at all, as seconds aren't printed in this case.)
I've also created comprehensive unit tests.
tor version: 2.6.0-alpha tor git: f94e5f2e5212034cb8b2666716eeaa61e874065b
I'll post the GitHub branch after I've created the changes file.