audioflinger: fix OutputTrack initial check

Call initCheck() on newly created OutputTrack in
DuplicatingThread::addOutputTrack() to make sure that
the track is successfully attached to the AudioMixer.

Also make invalid track name always fatal in AudioMixer::deleteTrackName().

Bug: 29953737
Change-Id: I47f2517bd53de940e125391de99c40611ad0fc9d
diff --git a/services/audioflinger/AudioMixer.cpp b/services/audioflinger/AudioMixer.cpp
index aea6b67..0be7199 100644
--- a/services/audioflinger/AudioMixer.cpp
+++ b/services/audioflinger/AudioMixer.cpp
@@ -430,7 +430,7 @@
 {
     ALOGV("AudioMixer::deleteTrackName(%d)", name);
     name -= TRACK0;
-    ALOG_ASSERT(uint32_t(name) < MAX_NUM_TRACKS, "bad track name %d", name);
+    LOG_ALWAYS_FATAL_IF(name < 0 || name >= (int)MAX_NUM_TRACKS, "bad track name %d", name);
     ALOGV("deleteTrackName(%d)", name);
     track_t& track(mState.tracks[ name ]);
     if (track.enabled) {