Fix strftime unit test.

The test tests/acceptance/01_vars/02_functions/strftime.cf would fail
builds on Sundays. The policy specified Sunday as 7 but strftime specifies
Sunday as 0.

From strftime(3):

     %w    is replaced by the weekday (Sunday as the first day of the week)
           as a decimal number (0-6).
(cherry picked from commit 4d6b69fbd2f421725b7f1308b15190c7b933c7fe)
Merge pull request #1029 from kacfengine/3.5.x

[3.5.x] Fix strftime unit test.
Add acceptance test for empty splice dereference
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.
(cherry picked from commit 53036220dbe8384062d061533b6ce19557776377)

Conflicts:

	cf-serverd/cf-serverd-functions.c
	configure.ac
Add support for Debian's GNU/kfreebsd

See http://sources.debian.net/src/cfengine3/3.2.4-2%2Bnmu1/debian/patches/626647-kfreebsd-support.patch for reference.

(cherry picked from commit dfa5cd99126a18add631ecf5fefcdedf6514e64c)

Include changelog update.
Merge pull request #1054 from kacfengine/3.5.x

[3.5.x] Backport of https://github.com/cfengine/core/pull/1036
Update ChangeLog with fix for #3479
Update ChangeLog with 3.5.3 fixes so far
Redmine#3429: improve copy+purge acceptance test, fix bug, and improve message

(cherry picked from commit 2abc7191ff43c86ca5539e63e58cfc0cda874238)

Conflicts:
	cf-agent/verify_files_utils.c
	tests/acceptance/10_files/01_create/copy_and_purge.cf

Include ChangeLog update.
Fix cf-monitord HISTOGRAM array initialization. + update Changelog

Redmine #3180
(cherry picked from commit e7c381603c5446a13e865dad6c64e4f35900ca45)
Merge pull request #1066 from awsiv/fix_histogram_array_initialization_35x

Fix cf-monitord HISTOGRAM array initialization + update Changelog
Changing lsdir to consistently return an slist

If a directory is passed to lsdir which does not exist, it will return
the mismatched type scalar, as compared to its normal return and the
dictated return type in its function definition entry of slist.  This
causes all evaluation to stop in the event of a missing directory due
to mismatched assignment in a var designated as slist.

(cherry picked from commit 2e5a9640e62405de2a9acf56cc5d032fbc4aa630)

Include ChangeLog update.
The epoch calculation for stime inrange calculation was wrong 1 day to early. Therefore processes are killed that shouldn't be killed.
Suspect due to wrong calculation of leap year.  the code is complicated and replaced it by mktime() calls

Also adjusted the verbose message and show the calculated process epcoch time, eg:
    Selection filter matched absolute 'STIME/START' = '10:47(1370594820)' in [1339065675,1370598075]

I like the defintion of leap day, from the dutch wikipedia:
"In different cultures (such as Norway) Leap traditionally a day on which women men may invite a date. Also the marriage
proposal is subject. February 29, traditionally the role reversal"

(cherry picked from commit b7997b88bf6f52d18659bd1bc0499680967fb2a8)

Include ChangeLog update.
 remove extraneous text from bootstrap message - fix #3644
Fix possible buffer overflow.

(cherry picked from commit 47a131871720268f2162278d915404d65052d9c8)
Be a bit more descriptive about package promise changes.
Merge pull request #1106 from kacfengine/3.5.x

[3.5.x] Be a bit more descriptive about package promise changes.
Merge branch '3.5.x' of github.com:cfengine/core into 3.5.x