COMETD-506 - Failed subscriptions should remove listeners.

Implemented proper removal of listener in case of subscription
failures. This was only needed in the Java client, since the
JavaScript client already had this feature as part of COMETD-459.