[fix] null objects and remove listeners only after we have emit the clos...

...e event, fixes #214 for the timeout case

@lpinca this should handle what was discussed. Should come with a test but I'd love to see @wallverb's failing test case ;).