Add support for duplicating RR records with mdns_record_copy()
Add function mdns_query_copy() to duplicate query structures as well.
Also did a number of memory leaks from valgrind.