Reduce transaction size when deleting a host

This is a patch backported from:
https://github.com/theforeman/foreman/pull/1907

Which was originated by:
http://projects.theforeman.org/issues/8316