Fixed off-by-one error in SDL_AudioQuit() (thanks, Rainer!).

Audio Devices IDs are offset by one.

Fixes Bugzilla #1971.
Protect SDL_PauseAudio*() with the audio callback lock.

Otherwise, you can pause audio and still have the callback running, or run
 one more time. This makes sure the callback is definitely stopped by the
 time you return from SDL_PauseAudio().