How to go from Msg to corresponding Element and object, and back.

The system sets up a set of Manager Elements, one for each Msg subclass
(Single, OneToAll, Sparse, and so on).
These Manager Elements are OneDimGlobals, that is, an array.
The Manager base data class is just a MsgId (with some added functions).

So every time a message is created, it figures out which Manager it belongs to,
and pushes back its MsgId onto the array. The Msg constructor calls
MsgManager::addmsg( MsgId mid, Id managerId ).


There is a static vector of unsigned ints, Msg::lookUpDataId_, indexed by 
msgid, to look up the dataIds for each msg. So:
Msg to DataId: Msg::lookUpDataId_[msg->msgid]

object to msg: Msg::safeGetMsg( getMid() );
where the getMid function just returns the mid_ value of the MsgManager.

In use, the derived MsgManager, such as SparseMsgWrapper, typecasts the Msg to
the appropriate type and does stuff with it.


