Internal data coherence checks + removal of keys from lastseen and fs

- A helping function that I needed from item_lib.c
- Lastseen DB coherence is redmine #2463
- Key removal is redmine #2025
- Key removal is started only if the lastseen data coherence is good
- DNS resolution for deleting hosts is gone (host is ideally an IP address)
- Discussed previously in pull #694