1. Remove a message type object from the list of all message types when freeing it.
1. Remove a message type object from the list of all message types when freeing it.

2. When a type handler is being set for a message type, we shouldn't recreate the object if it has already been destroyed when the handler being set is NULL.


secure-endpoints/netidmgr,secure-endpoints/netidmgr,secure-endpoints/netidmgr,secure-endpoints/netidmgr,secure-endpoints/netidmgr