Notify the delegate of events after updating our internal state

Updates the open and close methods to notify the delegate last, after they've updated the current state.

Should the delegate decide to inspect the given EventSource, its state should be consistent. Otherwise, the following assertion would fail:

```objc
- (void)eventSourceDidClose:(TRVSEventSource *)eventSource {
    NSAssert(eventSource.isClosed, @"Event source should be closed");
}