audioflinger: Stop resetting compress offload streams

 * This code should only be invoked for legacy DirectTrack.
 * Fixes issues with compress offload failing due to lack
   of metadata after skip / seek.

Change-Id: I4e2eef6421421532556ba411542cfe2f9c1e3802
audio:Avoid AudioTrackThread if Track creation fails

-mAudioTrackThread is starting before the track creation.
 This thread is used to process the audio buffer, which
 is no longer valid if the track creation itself is
 failing.

-Fix is to check for the result of track creation and
 based on the result need to start the mAudioTrackThread.

Change-Id: Ic69e45f4269408ff60fe83390e9f8d0c895582e3
CRs-Fixed: 611668
libstagefright: Fix ANR issue in HTTP Streaming

The root cause of the ANRs during this usecase is the
blocking nature of the read calls on the network data
source due to which application thread gets blocked on
some lock in framework.

Fixes ANR during seek/pause during HTTP streaming
* Non-blocking read implmentation for NuCachedSource2
* Other framework related changes to handle underruns

Change-Id: Ief280b7e23727606746e1ca2bf4caa4a3044b7bc
audio:Avoid VideoLagUpdate if there is no AudioPlayer

-When AudioTrack is failed to initialized, mAudioPlayer
 is deleted in onVideoEvent but onVideoLagUpdate() is still
 trying to access mAudioPlayer which is leading to a crash.
 The function onVideoLagUpdate() is used to notify if video
 is lagging behind audio. So this function is no longer
 valid if AudioPlayer is deleted.

-Fix is to add a check for AudioPlayer in onVideoLagUpdate,
 which will avoid onVideoLagUpdate() if there is no
 AudioPlayer

Change-Id: Ie8dbfc1995a3da88a4a435ec2de86b1c22a07c65
CRs-Fixed: 647200
Smooth out AwesomePlayer

Use clock estimator to smooth out audio time stamps.

Change-Id: Iec1ff30c011069d06ff8051fc4839d00895463d6

Conflicts:
	media/libstagefright/AwesomePlayer.cpp