evalfunction.c: give FNCALL_OPTION_CACHED to more functions
Remove leftover header.

nftw() was not used after all.
Merge pull request #1111 from kacfengine/master

Remove leftover header.
Merge pull request #1110 from cduclos/call-collect-agent

Transitioning to a new Call Collect mode.
Compilare necessus est.
Log new function result cache entries and hits

Remove FnCallShow, use existing FnCallWrite
01_vars/02_functions/execresult_multiples.cf: fix test for new logging
evalfunction.c: give FNCALL_OPTION_CACHED to more functions
Implemented safe_open() in order to avoid symlink race conditions.

It makes sure that we do not follow unsafe symlinks, that is a link
that belongs to a user, but has a target owned by a different user.
It does this in a way that avoids race conditions (between testing if
a file is a link, and opening that file, there is a small window of
opportunity).

Also implements safe_chdir(), to also safeguard chdir() operations.

Fixes issue #3693.
Merge pull request #1115 from kacfengine/safe_open

Implemented safe_open() in order to avoid symlink race conditions.
Work around fdopendir() missing on some platforms.
Merge pull request #1117 from kacfengine/safe_open

Work around fdopendir() missing on some platforms.
Add missing header.
Merge pull request #1121 from kacfengine/safe_open

Add missing header.
Don't use O_DIRECTORY flag, which is Linux specific.

Directories will fail when we try to chdir into them anyway, so all
we lose is the early warning.
Switch back to test folder after each test.

Otherwise the test framework may try to write into the wrong
directory.
Merge pull request #1123 from kacfengine/safe_open

Some fixes to the safe_open() function.
Fix format strings for uint64_t types
const'ify VerifyFinderType
Fix PromiseResultUpdate invocation in VerifyFinderType