configure: Add pkgconfig file

Thus, path discovery becomes mostly a non-issue.

You're supposed to use pkg-config to get the library and include path:
 pkg-config --cflags --libs naemon

(or, using autoconf, PKG_CHECK_MODULES([NAEMON], [naemon]) )

You're then supposed to do
 #include <naemon/naemon.h>
to get all the relevant bits of naemon.

Thanks to the -uninstalled file, you can, as soon as you've configured
this repo, build against uninstalled, in-development code, simply by doing
 ./configure PKG_CONFIG_FILE=../naemon-core
or wherever your clone is.

Yeah, none of these commands/paths are compatible with nagios, so there
goes the "drop-in replacement" - but, then, nothing ever was fully
compatible with nagios. You'll be able to ifdef your way around it, if
you're building modules.

Signed-off-by: Robin Sonefors <ozamosi@flukkost.nu>
pkgconfig: Export the location of the naemon main config

Modules will want to find this file in order to insert themselves during
install, and this means each module doesn't have to guess the path -
they can simply run
 pkg-config --variable=mainconf naemon
and the path shall be revealed.

Signed-off-by: Robin Sonefors <robin.sonefors@op5.com>
Add include guards everywhere

If we expose not only all the internal methods and functions, but also
the very file they're in, we'll be stuck forever, unable to improve or
refactor anything.

The guards means that only naemon gets to include naemons specific
header files, and only non-naemon code gets to include naemon.h. Naemon
devs can update naemon code, without angering module devs when they
change things. At least not as often.

Tests can be a bit of a special case - I'd expect unit tests to follow the
naemon convention but perhaps not integration tests. Alas, our tests
have no structure or purpose, so they get to work within the confines of
all the other naemon code.

Obviously, this "block" is easy to get around - just define
NAEMON_COMPILATION - but if you do that, you get to keep both pieces
when your code breaks.

Signed-off-by: Robin Sonefors <robin.sonefors@op5.com>