CommonMessaging: remove (dummy) inheritance if it is not required
CommonMessaging relies on two methods to work, and either requires its base class to define them, or it injects them as pure virtual functions. In case the base class defines them, there is a dummy mix-in generated. This patch eliminates the dummy mix-in, and only adds a mix-in if it is required.