Cleanup validateip v1

Cleaned up repeated code in "util-host-os-info.c" and "src/util-radix-tree.c".