AEEncoderFFmpeg: switch to avcodec_encode_audio2 and convert input audio to a format accepted by the encoder if AE does not handle it. Fixes transcoding to AC3 for passthrough (e.g. HDMI).

Without this, with ffmpeg 1.1 and later, xbmc segfaults when trying to transcode
to AC3.

It would be better to have AE to support planar formats but this fallback will be useful in case there are even other audio formats introduced in FFmpeg and is simpler for now.