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
am 4afbba6e: Fix BufferOverflowException when merging dexes

* commit '4afbba6ebbd7b71774a09a9d74f2ee30352d64a1':
  Fix BufferOverflowException when merging dexes
am ff643a71: Merge "Fix synchronization when preparing ids." into klp-dev

* commit 'ff643a71289d972e66a61637947090c6dc950d14':
  Fix synchronization when preparing ids.
am d232cbc9: Merge "Deactivate multi-thread in multi-dex mode" into klp-dev

* commit 'd232cbc99d9452846bf00b710e6f2bac8f48ea2e':
  Deactivate multi-thread in multi-dex mode
am 0433badc: Merge "Use RETURN_PTR(NULL) instead of RETURN_VOID in newNonMovableArray."

* commit '0433badc9b593cba85ec4e1f60ad1d75d1e99757':
  Use RETURN_PTR(NULL) instead of RETURN_VOID in newNonMovableArray.
am 9f663964: Merge "Remove some ARMv5 cruft."

* commit '9f66396459268dc90d704110ae5ccb660246a266':
  Remove some ARMv5 cruft.
am 0a09de93: Merge "Remove the sole reference to __ARM_HAVE_BLX."

* commit '0a09de93903e3f0ba11e4c3952f0979b4e29604b':
  Remove the sole reference to __ARM_HAVE_BLX.
am ad7a71d1: Merge "Use libziparchive for dalvik zip processing."

* commit 'ad7a71d1c414238c9e9eb2a95ccfdbdc25ff69ff':
  Use libziparchive for dalvik zip processing.
am bbc00477: Merge "Fix libutils dependencies for dexdump & dexlist."

* commit 'bbc00477d6885e0ce3a02a0bcf7d5abfd887a986':
  Fix libutils dependencies for dexdump & dexlist.
am fd154858: Merge "Retry mount() if it fails with EINTR"

* commit 'fd154858ac3d7f8fce1c2d277b6cde216e0ad283':
  Retry mount() if it fails with EINTR
am a2014f26: Merge "Revert "Use libziparchive for dalvik zip processing.""

* commit 'a2014f266254027e61ce9f89ad07ab83bd165cec':
  Revert "Use libziparchive for dalvik zip processing."
am 254d5a29: Merge "Revert "Revert "Use libziparchive for dalvik zip processing."""

* commit '254d5a292272ef9352505eca98e08200c75bb042':
  Revert "Revert "Use libziparchive for dalvik zip processing.""
am ff3f62b4: Merge "Fix a few bugs introduced by the move to zip_archive."

* commit 'ff3f62b460c2190184ebcae0f583e64b4a634ed1':
  Fix a few bugs introduced by the move to zip_archive.
am 55d361a5: Merge "Fix libutils dependencies for dexdump & dexlist (again)."

* commit '55d361a53e77d6f90a4f73c040811a23ef864341':
  Fix libutils dependencies for dexdump & dexlist (again).
am 99208b87: Merge "Dalvik: Add sdiv support in the interpreter"

* commit '99208b87555abb86966ff40312a1f42d4d8d1b2e':
  Dalvik: Add sdiv support in the interpreter
am 0b1cae80: Merge "Dalvik: Add sdiv support in the JIT"

* commit '0b1cae8057eabedbd26375ca677e1843959ce521':
  Dalvik: Add sdiv support in the JIT