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
stagefright: OMXCodec: free allocated port-buffers if init fails

If an error is encountered while allocating port buffers, init
would fail and buffers already allocated would not be freed.
Move OMXCodec to ERROR state and explicitly stop omx component,
hence forcing free-ing up of allocated buffers.
Also defer setting port-status to ENABLED only after having
moved the component to IDLE and add graphicBuffer to port-
buffers-list only if setBuffer is successful.

Change-Id: I54ffb2a299376bf1716473e94948c36648d24b92
CRs-Fixed: 610702