Gracefully close client socket when exiting

Needs some tweaking to ensure GreenletExit is raised in rngd_handler as
well