Don't check client->sa_family twice

We (as the server) won't select on the TAP fd until we know the client
address, so we don't need to check again. (If by some misfortune we do
see a read event on the TAP fd before client is initialised, then our
sendto will fail anyway.)
Move the write() loop to a tap_write function
Clean up the code by using fewer sockaddrs

The server and client both keep their peer address in peer/peerlen. The
client can initialise this straightaway from server/srvlen; the server
has to wait for recvfrom() to initialise it. This gets rid of target
and the code to set it based on role.

This does mean that in the client, peer/peerlen are overwritten by the
recvfrom, but that's fine because we connect()ed to the server address
earlier, so the kernel will make sure we don't get packets from anyone
else. And the code becomes simpler.
Check for errors after read(tap, …)

The earlier cleanup made this missing case more noticeable.
Make sure peeraddr is initialised to 0 in the server