Miscellaneous audio record fixes

Call AudioSystem::stopInput() if exitPending() after wait() returns.

Acquire lock before clearing mActiveThread.

Change-Id: Ia55e4c4b3accc65ad5479cbdc094fd919152af9f
1 file changed