Check if destroyed before handling close event.
Do not handle agentEmitter events if destroyed.
Fix linter errors.
Return early in Agent#nextURL if destroyed.