Use setrlimit(RLIMIT_NPROC) to prevent forking

This will prevent denial of service by fork bombing, and also pave the
way for using a distinct UID for every connection (since we won't have
to worry about killing off latent processes owned by the UID).
Use select() instead of poll()

poll() fails with EINVAL if nfds exceeds the RLIMIT_NOFILE value.
Since I plan to set RLIMIT_NOFILE==0 as a security measure, poll()
is unusable.  select() does not have this restriction.
Set RLIMIT_NOFILE==0 in unprivileged processes

This prevents an attacker who gains arbitrary code execution
from creating sockets and launching attacks on the network.