server: Added SIGINT handler to shut down

The main server loop never breaks. Sending SIGINT (CTRL-C) is the only
way to gracefully shut down the server, disconnect peers and clean up
memory.