Do not replace stdout in child worker process.

Unidentified spurious problems on Solaris 9, with file descriptor 0
*not* corresponding to stdin, triggered me to change the worker child to
not close its stdout and replace it with the dup()ed pipe
descriptor. Instead, it now fprintf()s directly to that pipe.

Didn't fix the problem on Solaris (still investigating) but still its a
good change.
pthread_cond_timedwait() takes absolute time

Also fix threads actually delivering the signal when they should.
This fixes test failure on Solaris.
Using high precision clock should avoid corner case...

where time(NULL) returns e.g. 5, but time is 5.99.
Thanks to @kacfengine for spotting this.
Merge pull request #1778 from jimis/lastseen_threaded_load_fix-redmine6103

Lastseen threaded load fix redmine6103