libstagefright: optimize thumbnail generation path

- Checking for YUV420SP format support is not intended for software
  decoders and can be skipped. This avoids unnecessary creation of
  hardware decoders for checking supported output formats.
- Change the flag from kPreferSoftwareCodecs to kSoftwareCodecsOnly.
  This will force software codecs to be tried first and not just "prefer"
  which helps when a software codec for a particular type of codec (like
  divx) doesn't exist and avods creation of hardware codecs twice in case
  of hardware failure.

Change-Id: I682bca5b6bac5a56f46fe3655cd722fe5f08e1e6
audio: fix for deadlock issue during LPA playback

EffectModule::setEnable for LPA playback was modified to lock
AudioFligner::mLock with EffectModule::mLock held.
And at the same time ~DirectAudioTrack is trying to lock
EffectModule::mLock with AudioFlinger::mLock held and this
results in deadlock.
Fix this issue by reverting previous change and acquire
locks in certain sequence to avoid deadlock in setEnabled_l

Change-Id: Iea74eb3591a728275c655074a4d2017bd38f99ab
libstagefright: Add pause support for hardware omx component

-ADSP doesn't enter sleep state after wma playback is paused
and power suspended.
-No support for NT session pause in case of hardware component.
NT session need to be paused to put ADSP into power collapse.
-Add support of pause in stagefright to ensure device enters
suspend mode. Also add intermediate states to avoid concurrency
issues between read and pause.

Change-Id: I87b0992f3d4d580c3a68d27fbed6b65d2200dda9
CRs-Fixed: 496256
Merge remote-tracking branch 'aokp/jb-mr2' into jb-mr2