Added signal handling for gentle exiting in main Tornado server