AudioMixer: Enable 256 tracks, up from 32 tracks

Client apps can have 40 tracks, up from 14 tracks

Related code cleanup:
a) Removed State nested class
b) Moved static functions to Track member functions
c) Moved static function hooks to pointer-to-member-function hooks
d) Some reorganization of touched code for recent C++ style

Test: test-mixer native mixer test
Test: SoloTester effect test
Test: SoundPool with many tracks
Test: CTS AudioTrackTest
Bug: 64161002
Change-Id: I0d09620acd715d577e776bb6f76e94e87e554520
diff --git a/services/audioflinger/Threads.h b/services/audioflinger/Threads.h
index 17f26c5..a519341 100644
--- a/services/audioflinger/Threads.h
+++ b/services/audioflinger/Threads.h
@@ -623,8 +623,7 @@
     static const int8_t kMaxTrackRetriesOffload = 20;
     static const int8_t kMaxTrackStartupRetriesOffload = 100;
     static const int8_t kMaxTrackStopRetriesOffload = 2;
-    // 14 tracks max per client allows for 2 misbehaving application leaving 4 available tracks.
-    static const uint32_t kMaxTracksPerUid = 14;
+    static constexpr uint32_t kMaxTracksPerUid = 40;
 
     // Maximum delay (in nanoseconds) for upcoming buffers in suspend mode, otherwise
     // if delay is greater, the estimated time for timeLoopNextNs is reset.