[PLAT-5359] Embed the listener in the client to simplify lifecycle management
[PLAT-5359, XLS-613] Helper methods for working with objects that might have lifecycles