core: limit timestamp to sane precision

Anything below .1 s is meaningless anyway.
tmpfiles: use allocated buffer for path

Paths can in principle be longer then PATH_MAX, so
simply allocate the buffer with malloc().

CID #1237773
shared: util - use nicer idiom to silence Coverity

Change the other spot too.
tests: add tests for {hashmap,set}_steal_first

Just to make sure that coverity is wrong.