omap4-common: wrap Moto's proprietary audio-HAL

Moto's audio-HAL is internally resampling when playing sound
via bluetooth SCO (voice dialer, google now). When doing so,
the returned value of written bytes is the arbitrary number
192 when in fact all samples have been written.

Wrap Motorola's audio-HAL to overload write() and catch
that scenario and fix the return-value.

Also prevent changing of device-settings when a read/write
is in progress, as this might cause the operation getting
stuck when the device is disabled at the wrong moment.

This should fix sporadic audio-losses caused by changing
mixer-settings while playing/recording.

Change-Id: I8d2e27f67f224dfb48f00801a64c4586b22c70ac
Enable use of FFMPEG codecs for extended formats
Add OMX_AUDIO_Coding and OMX_VIDEO_Coding

Copied from the stagefright-plugins project.
OMAP4 uses it's own OMX_Audio.h, OMX_Index.h, OMX_Video.h

Change-Id: I516f08b78298f5796325ec3ef12f5d7573a01b85
Merge remote-tracking branch 'upstream/cm-11.0' into slim4.4