fixes #6126 - deleting a subnet that is associated with a host group throws foreign key error

when I moved `before_destroy EnsureNotUsedBy.new(:hosts, :usergroups)` above the `has_many` definitions, it caused a usergroup_test failure on  "can be destroyed when in use by another usergroup, it removes association automatically". So, I removed `:usergroups` from the `EnsureNotUsedBy.new` parameters