Deactivate multi-thread in multi-dex mode

It should already have been the case, but it wasn't and it crashed.

Change-Id: Icb461d6e43ef2d113f59038d8c2327f3cfaff86c
(cherry picked from commit cf069ca52f2af9f70fcbeac99443f00401d43b4a)
Fix synchronization when preparing ids.

Synchronized blocks were using different locks.
Replaced by a safer version: marking intern method synchronized.
This means synchronizing more than necessary but it had no
mesurable perfomance impact.

Bug 11744785

Change-Id: I35e691232cd6971d13735be9b72969739ef71e09
(cherry picked from commit 5c4883e75b26a002c67bfa1c0053c50e17dbac90)
Fix BufferOverflowException when merging dexes

Bug: 11519714

The bug was due to the fact that when merging 2 dexes, not enough size may be reserved for the "typeLists" section.
This is because we only aligned the sum of the size of both sections.
If both typeLists sections were aligned with 2 and not with 4, we are 4 bytes short when writing.

Change-Id: I73b51eb25434a622143011741a69b88d42507f43
(cherry picked from commit 2241dbe132cf90b58f93c014bdd807405b7f82f5)
Merge "Fix synchronization when preparing ids." into klp-dev
Merge "Deactivate multi-thread in multi-dex mode" into klp-dev
Changed dvmDexCacheStatus to check for odex file first.

This prevents the generation of a new dexfile when an odex file already
exists when switching between Art and Dalvik.

Bug: 13463154
Change-Id: I55ef9abe1fe172ee656550e78556381f95698c33
Dalvik :Increase the upper limit check for DexOpt Deps table

Increasing upper limit check for the Deps table as additonal
jars added causes the dalvik to crash while performing dexopt
on cached jar files. This is needed for passing cts test case
which is part of libcore.java.util.jar.DalvikExecTest class

Change-Id: I5431238839712499122eb35132599230d8610de8
CRs-Fixed:621955
Use RETURN_PTR(NULL) instead of RETURN_VOID in newNonMovableArray.

RETURN_VOID doesn't set the return value. This means that we are
returning random garbage when the allocation doesn't succeed.

Bug: 11971220
Change-Id: I570562c7bb9dc573161294916f582709774b35fd
Revert "dalvik: add placeholder for future changes"

 * There are GC issues with this version. Rollback for now.

This reverts commit cdf7a375a8e44fad85e90e7234e561088b20a897.

Change-Id: I983a14a7c39f99427e4a437f1a752fc99db91e28
dalvik: Disable loop hoisting optimization on perf builds

 * Fixes VSCO Cam array traversal crash when perf is enabled.

Change-Id: I57e59e407a538c4cc48972f4cf3167c505d7ded4
Merge remote-tracking branch 'cm/cm-11.0' into kitkat-legacy
Merge tag 'android-4.4.3_r1' into HEAD

Android 4.4.3 release 1
Merge remote-tracking branch 'cm/cm-11.0' into kitkat-legacy