audioflinger: decline track to be offloaded if there's active one

-If multiple offload tracks are activated at the same time,
 status of the tracks can be affected by each other and results
 in unexpected behavior
-Deny subsequent track to be offloaded and fall back to sw decoder
 if there's already actived one

Change-Id: Idaa9213d54b9bcdd0e5c25c1dec516d994ae006f
CRs-Fixed: 704382
frameworks/av: Avoid timestamp query to AudioPlayer during reset

-Timestamp query while in reset leads to ANR in few cases.
-Destruction of mutex in AudioTrack destructor during reset and
trying to lock the destroyed mutex as part of getPosition() call
in parallel leads to ANR.
-Avoid querying for timestamp in case reset operation is in progress.
Instead use mAudioTearDownPosition to retrieve current playback
position.

Change-Id: Ifaa7f6236ebce1b27a0cca621bbb188c94af142d
audio: Update timestamp for offload playback after EOS.

- After EOS of offload playback,audioplayer was not
  updating the timestamp.
- Query the HAL for the last rendered timestamp when
  HAL sends EOS notification.

Change-Id: Ifa25e0a9a1a245cc74c92294ab0a322db0ab4bec
stagefright: Add flag for enabling enhanced offload support

 * Some devices might not use the QCOM_HARDWARE flag, but still
   want to get the improved audio offload support.
 * Add TARGET_ENABLE_OFFLOAD_ENHANCEMENTS to enable support for
   PCM offload and 24-bit playback with no extra dependencies.

Change-Id: Ie1a92602c6c0cd59008db8dbf72125eecef08e85
stagefright: Fix NULL pointer access issues

Fix NULL pointer access issues in stagefright & move printFileName
to ExtendedUtils.

CRs-Fixed: 694900
Change-Id: I390f692b72fcb40e31a095abbb412afebde0a64f