[configure] use pkg-config for rtmp detection. fixes linking with newer librtmp versions
[configure] fix static linking when ffmpeg found nettle/hogweed
Merge pull request #4642 from wsnipex/linking-fix

Linking fix [fixes #15139]
Revert "[osx] drop outputbuffer index and iterate over them all"

This reverts commit b9a1d07a7d1a2bec3bb094b97cc7d96a325b9b98.

Conflicts:
	xbmc/cores/AudioEngine/Sinks/AESinkDARWINOSX.cpp
[darwinsink] - use fixed outputbuffer with idx 0