Refactor header files so each method has its prototype in matching header files

Generally when coding C, each .c-file should have a matching .h-file, which contains what's defined in the .c-file. That means, a method that is defined in abc.c should have its prototype in abc.h, not in project.h.

This has several benefits:
- Tracking dependencies between parts of the system is much easier.
- Refactoring/rewrites of certain parts is easier
- Easier to check if the list of prototypes is updated to match the .c-file (only one .c and one .h-file to look at at a time)

And in fact, I can't se anything against it.

To make this patch, It was also nessecary to add -Werror and fix some minor warnings, to track and fix the implicit declaration warnings that appeard. Therefore the cleanup header-commit is dependent on Add -Werror-patch.

No methods is removed or changed, just where they are prototyped, but it will most likely break compatibility with some broker modules in the sense that some more #includes needs to be added. Already compiled broker modules should work though.

Comments?