Fix compilation error with "void setnetgrent" / "void endnetgrent"

Code assume that the functions "setnetgrent" and "endnetgrent" return
int. On some platform (some bsd, android, ...) the return type is void.
This patch fix the compilation issue by testing return type with autoconf
add a test for bionic before including netinet/ip.h
Cpu, load and process gathering monitoring unit tests
Avoid appending empty include dir to CPPFLAGS

Previously, this resulted in invalid compile options such as the following tokyocabinet test:
gcc -o conftest -pthread -g -O2 -O2 -DNDEBUG   -I/usr/local/include -I    conftest.c -ltokyocabinet
Fix file descriptors leaks
Redmine#3273: acceptance test for lsdir()
Merge branch 'final/monitor_test' of git://github.com/jeffali/core into master

Conflicts:
	tests/unit/Makefile.am
Merge pull request #903 from kacfengine/master

Revert "Disable enterprise_extension unit test."
Use decoded JSON strings in JSON DOM
Merge pull request #894 from tzz/tzz/3273-lsdir-empty

Redmine#3273: acceptance test for lsdir()
Merge pull request #890 from awsiv/fix_empty_include_dir

Avoid appending empty include dir to CPPFLAGS
Merge pull request #841 from CedricCabessa/contrib

fix compilation issue on the Android platform
Merge pull request #893 from lpefferkorn/fix_fd_leaks

Fix file descriptors leaks
Add some inline documentation to example policies
Add SeqGetRange
Merge pull request #907 from maciejmrowiec/master

Add SeqGetRange
Redmine#3277: inform instead of error for missing var refs.
Add StringGetToken, StringCountTokens, struct StringRef
Merge pull request #909 from tzz/feature/readmine3277-inform-about-invalid-varrefs

Redmine#3277: inform instead of error for missing var refs.
Move Windows replacement functions to enterprise.

Move the actual files and make sure detection is done properly and in
the right place.