av: Various fixes and cleanups

Change-Id: I82225d8cd3e2b3015e6c0e1dd9ddc5ec8abab525

Conflicts:
	media/libmedia/AudioTrack.cpp
	services/audioflinger/AudioFlinger.cpp
	services/audioflinger/Threads.cpp