Increase unit test coverage

Added various unit test to improve code coverage of unit tests : (json, POST, whitelist corner cases ...)
Added support for gcov / lcov build in Makefile, ability to generate code coverage report of unit tests (swith in Makefile).

The makefile should be moved to a *script, as it doesn't have much more of a Makefile left ...