Replace getAndRemoveX methods in AbstractContext with a generic one.
Implement component-scanned and XML-based EventSubscriber registration.