xutils: put commonly used code into xutils, remove deprecated one

Signed-off-by: Daniel Borkmann <dborkman@redhat.com>