ffmpeg: fix deadlock caused by calling avctx->thread_count after codec_open
Revert "[osx] drop outputbuffer index and iterate over them all"

This reverts commit b9a1d07a7d1a2bec3bb094b97cc7d96a325b9b98.

Conflicts:
	xbmc/cores/AudioEngine/Sinks/AESinkDARWINOSX.cpp
[osx/coreaudio] - add method for fetching the the start channel number of a stream in relation to its owner device
[osx/coreaudio] - add method for setting the audio source of a device, and methods for fetching audio sources and their names, constify where needed
[AE/osxsink] - for the extra display name use the audiosource name or the channel numbers for multistream devices
[AE/osxsink] - for the default device show the devicename behind it as extraname
[AE/osxsink] - enumerate the audio sources of a device if there are any - this allows to select between multiple airplay sinks for example
- obey the streamidx during initialize/streamscoring
[AE/osxsink] - only apply channel map when not in passthrough mode (cosmetic - ActiveAE seems to ignore the channels anyway in passthrough mode - but for proper logging "Raw, Raw")
- only set 16bit format when bitstreaming is enabled - in real passthrough don't alter the format (keeps AE_FMT_AC3/AE_FMT_DTS)
[AE/osxsink] - when fetching channelMap during enumeration use the number of outputchannels of the stream instead of the whole device
[AE/osxsink] - add comment to make clear that the requestedStreamIdx is "corrected" in FindSuitableFormatForStream
[ae/osxsink] - cleanup interleaved/planar pathes in render callback