send.c: factor out an add_prefix function

By splitting up send.c, it will be simpler to test.
send.c: rename write_dnssl to add_dnssl