Update for new cppcheck-target-cmake API.

Also added the NO_CHECK_UNUSED, NO_CHECK_GENERATED_UNUSED
and UNUSED_CHECK_GROUP options to control the behaviour
of the unused function checks in a more fine-grained
fashion.