url_handlers: delete_dns_domain: Fix DNS domain deletion

Commit 5835ab8 ("url_handlers: Convert delete_dns_domain to
is_users_domain") introduced a subtle bug when deleting DNS domains from
the secondary name server.

We were assigning a pointer to the domain name, however the variable
that the pointer was pointing to was being free'd before we'd finished
using it and thus got messed up.

strdupa(3) the 'domain' variable to solve this.

Signed-off-by: Andrew Clayton <andrew@dnsandmx.com>
url_handlers: delete_mail_domain: Fix mail domain deletion

Commit 8abb360 ("url_handlers: Convert delete_mail_domain to
is_users_domain") introduced a subtle bug when deleting mail domains.

We were assigning a pointer to the mail domain type, however the
variable that the pointer was pointing to was being free'd before we'd
finished using the pointer and thus got messed up.

strdupa(3) the 'type' variable to solve this.

Signed-off-by: Andrew Clayton <andrew@dnsandmx.com>