Special handling of signals for cf-key.

Handle SIGINT and SIGTERM to set gobal flag that makes the
ShowHost callback return false, thus causing ScanLastSeenQuality break
out of the while loop and return cleanly.

Fixes redmine #5957
Merge pull request #1742 from vohi/redmine/5957

Special handling of signals for cf-key.
Satisfy linker when building unit test.

This test is not testing anything right now, probably needs to
link in more code from libpromises once it does, but for now keep
it simple.