Fix use-after-free in QNAM propagator

This fixes Coverity CID 12929
c_time: Fix resource leak in error case

This fixes Coverity CID 12903
Fix potential memory leak

This fixes Coverity CID 12893
httpbf.c: Fix resource leak

This fixes Coverity CID 12902
statedb.c: fix potential memory leak on win32

This fixes coverity issue 12898