Fix some memory corruption bugs in the file writer which may cause the media server to crash

Currently, we hold the lock for the fragment queue for writing. This obviously resolves
the memory corruption problem, but could lead to performance issue.

MOT is reviewing PV's implementation of vector to see whether we use a second lock to prevent
frames to be released while we using the first element of the queued frames to do file writing.

bug - 2501987

Change-Id: If25ffd93702f93c5ee4120beca234156c9405895
1 file changed