lib/util: move some timespec helpers from source3 to the toplevel