Free event loop on shutdown.
Add QUIT command; return error on invalid command.