Don't close already-closed audio devices during SDL_Quit().

Otherwise, we spam a bunch of unnecessary SDL_SetError() calls.

Fixes Bugzilla #1791.
Added a FIXME.
Strip newlines from messages in SDL_Log*() before calling logging function.
Don't crash if SDL_AudioQuit() is called twice in a row.

Fixes Bugzilla #1396.