avwait: Correctly stop recording and signal recording stop on EOS
If recording is set to FALSE after the last audio or video buffer and before the EOS event then recording stop is never signalled.
Similarly, we should signal recording stop once both audio and video are EOS, regardless of the recording property, as there's nothing to be recorded anymore.