MediaElementImpl: Set the element state to NULL before removing from pipe

Change-Id: I2840acc6c8ef1950d868606554f3cff7ccb6c5e3