Added signals and memory cleanup on SIGINT in server (fixes #20).