Refactor CompatUtility::* for DB IDO, Livestatus, StatusData.

Fixes #5241