Fix exception when Release Audio Input Effect

Effect is removed while user switch audio output device.
When updating output device for record thread, exception happens.
Solution is to get record thread lock before update output devices.
Holding thread lock will keep effect not being removed while
updating devices.

Bug: 174714069
Test: Audio Stress Test
Change-Id: If831b2322bb02784b0a278abd9ba14b5150ff80b
1 file changed