Do partial reads in MemoryLeakTrackUtil

Do partial read in MemoryLeakTrackUtil dumpMemoryAddresses
to avoid using more memory than what is allocated.

Change-Id: I94feb4e00647407f938571167b981c7371f39e3d
libmedia: ensure mCaptureThread exit within Visualizer destructor

If mCaptureThread doesn't exit when Visualizer instance gets destroyed,
recycled member variables with random value such as danger pointer will
be accessed again and causes crash.

Thread which is created within Visualizer instance lifecycle should be
terminated before or within destructor.

CRs-Fixed: 688546
Change-Id: Ie0b12ae8a3b9735b6ecbac0353781b8358cad644