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.