Restore terminal settings after abort
Support both analogue and hdmi audio

Thanks to stupid-boy for the original implementation.
Follow xbmc way of initialising the clock
Update to latest xbmc OMXCore.cpp
Resend volume setting on audio codec change
Add high level locking to OMXVideo

Shutdown and decoding come from different threads.
If the components are shut down while a packet is being submitted, we get an OMX error.

OMXAudio already uses a critical section lock. OMXVideo should also do too.
Copy audio splitter port parameters directly

Should have the same effect, but direct way seems more robust to other changes
Allow number minor changes to passthrough audio without closing stream.

With passthough audio, the codec or sample rate changing require closing the audio stream.
The number of channels, bits per sample and bitrate don't affect the physical audio stream and so don't require the stream to be closed.