Fix google mocking framework detection
Google unit testing and mocking framework has to be compiled
with the same compiler flags as the code you are testing.
Merge pull request #860 from vigsterkr/utest

Fix google mocking framework detection
fix miscelleaneous erros/warnings

- fix example compiler error
- fix doxygen warnings
- fix compiler flag