Fix memory leakage from MPEG4Writer.

o The in-memory cache, mMoovBoxBuffer, holding the content for Moov box may not be freed.
o Added comment describing how the in-memory cache works
o Moved the memory release to a single place to make the code more robust
o Avoided allocating the in-memory cache if the file is not intended to be streamable

o related-to-bug: 7664029

Change-Id: If04fc6b12daeaaa86710dfb4b4b9c175da6421df
1 file changed