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 ...

![image](https://f.cloud.github.com/assets/990714/1372309/e1effa16-3a4e-11e3-8b19-c4e359b2731a.png)