MediaSinkImpl: Set element state to NULL before removing it from pipe

Change-Id: I2a0b9adb4f9a5e11b800609045998af30e014fc9