libmedia: Fix crash seen while running CTS

 * setVolume was called while the track was being torn down during
   MediaPlayerFlakyNetworkTest

Change-Id: Icb965478644909511215c17db3cf2debba85a864