Handle unlikely negative time in tor_log_err_sigsafe

Coverity wants this; CID 1130990.
Remove needless fd var from test. CID 1130989.
Fix a bunch of coverity-spotted unit test resource leaks

CIDs: 1130994, 1130993, 1130992, 1130991