MediaObjectImpl: add state attr

Change-Id: I8c9a477be4ce0200701186a9e3de0b7b26514dde
Use unregChilds flag

This flag tell us if children must be unreferenced
when the parent is unreferenced.

Change-Id: I3a25104fd12d4de41ab4a166f437155cd08450b3