Implement legacy behaviour for MediaPlayer's behaviour of starting from the start of the media on a start() call instead of resuming at the current position, if previously reached the end of the stream. Also properly report number of frames played to audio flinger. Finally, delay spawing the queue thread until actually used.

related-to-bug: 2453220
diff --git a/media/libmediaplayerservice/MediaPlayerService.cpp b/media/libmediaplayerservice/MediaPlayerService.cpp
index b4fc035..50dad33 100644
--- a/media/libmediaplayerservice/MediaPlayerService.cpp
+++ b/media/libmediaplayerservice/MediaPlayerService.cpp
@@ -1614,6 +1614,8 @@
     size_t actualSize = (*me->mCallback)(
             me, buffer->raw, buffer->size, me->mCallbackCookie);
 
+    buffer->size = actualSize;
+
     if (actualSize > 0) {
         me->snoopWrite(buffer->raw, actualSize);
     }