libstagefright: Fix timestamp corruption during offload playback

-Timestamp gets corrupted at EOS of offload playback.
-This happens because the number of samples played returned from
 HAL could be zero if playback has reached EOS and if compress
 handle is invalid / closed.
-If HAL has posted EOS  avoid the update of real time and media
 time with the timestamp from HAL.

CRs-Fixed: 570368
Change-Id: I5ea75f4eda1df0c110bce780e50e3c8ae9b4cd85
frameworks/av: Fix errors from upstream CAF merge

Change-Id: I1d1a515f75366ae8c1989aeea1eed0ef036ce96d
derp
libstagefright: Add support for custom LPA buffer size

 * On msm8930, during playback over A2DP with DSP Manager effects enabled,
   there's a lot of stuttering with the default buffer size. Stock kernel
   used a buffer size of 32, but that caused no audio at all in CM because
   of mismatch in buffer size between kernel and user space. So up until
   now I've been using a buffer size of 256 to get audio working at all,
   but unfortunately it causes stuttering as mentioned. Hence add support
   for a custom buffer size so we can revert to stock value used in kernel,
   and enjoy no stuttering.

Change-Id: Id4d090bc6cf90782c24f3832a35ddeca43bd72fc