Removes the listener function as callback of the selected RPC event.
Warning
This method will always return, even if there are errors while removing the listener, for controlling errors generated during the deregistration process use async removeListenerAsync(eventName, listener).