Re-implement WorkQueue item limit.
Revert "NullCheckTask should return StateOK."

This reverts commit 046ea13cc814900b163f4f5765afb84d2f3f2b14.
Remove unused #include.
Fix crashes when restarting Icinga.