Make CListener into a singleton

Some loosely-related cleanups are necessary in order to not crash.