Revert "stagefright: Cleanup ifdefs in pause code"

Breaks audio pause-resume on non-QCOM device. The code here goes
with QCOM-specific mPaused code in OMXCodec.cpp.

Also added one more ifdef to fix compile error.

This reverts commit f771dc65603c8d06865f08a1b88be60cb53e19dd.

Change-Id: I1ebf3d15cfb7bf5c92745e0ab88cffd7adf192a0
audio: Supress redundant effect config events in short duration

Distortion sound persists for the whole song when re-enabling effect in
LPA playback mode till switch to next song. And pop noise is quite obvious
when enable/disable effects in LPA.

As the design of LPA, EffectsThreadEntry() loop is used to handle effect
config changes through applying effects with new config on dsp pcm buffers.
However, it can't handle too many config change events in a short time,
and effect with new configuration will be applied on part of dsp buffers.

Filter out redundant effect config events that come too closely to avoid
applying effect on dsp buffer in vain.

Change-Id: If8915b1d068724d5976e1519ec57e3c08cf89c9d
CRs-Fixed: 562806, 563418
libstagefright: Add HEVC as a recognized MIME in ExtendedExtractor

For HEVC playback through ACodec, ExtendedExtractor needs to recognize
the HEVC mime type and set the appropriate role to the component.

Change-Id: I60e05f4f1e480e137401112431c5c8093e637d56
audioflinger: Fix for a deadlock

AudioFlinger enters a deadlock (with itself) on trying to free a
RecordTrack object that failed initialization. Clear this
bad object from the caller instead.

CRs-Fixed: 589020
Change-Id: I926f2beb922a70f6924e593e2bbf1a5b5df85b16