fixes #5675 - expect dns_key setting to be nil if not set

(cherry picked from commit 62c7320bbdedeb3d983addc1f78d8fe20b0d6f71)
Fixes #6396: an error removing a DHCP record (record doesn't exist) stops the delete process for a host

(cherry picked from commit 67bfd9a09741726cf7fa7c330b897b372a903d31)
Fixes #6412: Trying to remove a DHCP record fails due to an invalid subnet check

(cherry picked from commit 57ea7e82f68395c61ab0515ea331423c9f4ac5ea)
fixes #4699 - support Puppet environments API for directory envs

(cherry picked from commit 16db7a9c74abfba21b65d9f0e9a05096c3c7f8fb)