server: Perform only 1 write when appending a newline
server: Ignore SIGPIPE
server: Count the number of active connections for debugging
server: refactor readers into threads
server: Fix returning EOF and harden the code