python: Move dnsserver helper functions into samba.dnsserver