Fix/3.3/has registered listener

- Fixes https://github.com/hazelcast/hazelcast/issues/2913
- Includes some refactoring still needs some more.