Don't close file descriptors we don't own.
Fix cf-serverd stat()'ing the file tree every second.

The real problem is that signals are ignored by the event loop if they
arrive between calls to select(). The Linux approach would be to use
pselect(), but this doesn't work on some other platforms, most of all
Windows.

So instead we use a different approach: Writing to a socket is safe to
do in a signal handler according to POSIX, so we do that and listen to
that socket in the select() call.

The approach has been tested on both Linux and Windows, and is
verified to work even when forcing the signal to arrive before the
select() call is entered.

As part of this fix, the stat() timeout has been raised to one minute,
so that we still check for file changes reasonably often.

Fixes issue #3479.
Merge pull request #1036 from kacfengine/signal-fixes

Signal fixes
Merge pull request #1053 from tzz/tzz/1032-read-proc-and-sys-specially

Redmine#1032: add 0 maxsize read to empty file
Merge pull request #1044 from tzz/test/1077-abortclasses-without-classes-section

Redmine#1077: acceptance test for abortclasses without a classes: section
datastate() function to provide the container used by default templates