audioflinger: fix pre processing transfer between record threads.

Fix two problems remaining with pre processing effects transfer from
one record thread to the next in case of tear down due to device connection:
1 - the enabled state of the effects was not communicated to the new HAL
input stream.
2 - the effects saved in orphan chains list were not transfered to the
new thread when a AudioRecord was created.

Bug: 17757378.
Change-Id: I0923c98470db3b51154dc89846157780a4c21e86
diff --git a/services/audioflinger/Threads.cpp b/services/audioflinger/Threads.cpp
index 12e09ab..bdf74d5 100644
--- a/services/audioflinger/Threads.cpp
+++ b/services/audioflinger/Threads.cpp
@@ -6192,6 +6192,10 @@
 
     checkSuspendOnAddEffectChain_l(chain);
 
+    // make sure enabled pre processing effects state is communicated to the HAL as we
+    // just moved them to a new input stream.
+    chain->syncHalEffectsState();
+
     mEffectChains.add(chain);
 
     return NO_ERROR;