Close NGInputStream before sending exit code to client to avoid races. Allow NGClientListeners to throw InterruptedExceptions to interrupt main thread. Don't call clientDisconnected handlers during normal shutdown.