Add -Werror, and resolve compilation warnings.

Usally a warning actually is a problem (like implicit declaration).
Naemon was full name colissions between function argument names and
system functionsn (like int time; vs. time(), objectlist *accept vs.
accept())

Using -Werror, so those can easily be found and force the developer
to fix is generally a good idea, so add -Werror and resolve the
warnings.

Change-Id: If309428a2dc714c29fc4b2696758de861d4730ad
Signed-off-by: Max Sikstrom <msikstrom@op5.com>
Cleanup headers, each header should contain references to its .c-file

To be able to refactor, and track dependencies, it's much better to
keep .c and .h-files in pairs, where prototypes for each function in
a certain .c-file is put in the corresponding .h-file.

Historically, almost everything is put in one or two .h-files, making
it almost impossible to find the methods, and track dependencies,
because everything is included in all .c-files in that case.

The include-all-header-file would still be nice to have, but only for
use in linked libraries, where dependencies only can exist from
library to application, and not vice versa. Therefore that
include-all-header shouldn't be used anywhere within the application
itself.

Change-Id: Ib90870defb1f02b0752d987e4daa747fe54045e6
Signed-off-by: Max Sikstrom <msikstrom@op5.com>