Add interface for updating process state.

Called from activity manager to let the heap know when it should
perform compaction and trimming.
Bug: 8981901

Change-Id: Ib8ea48d2dc9d6901c3f2e0554391721d6691e726
Merge "Add interface for updating process state."
Fix intrinsic Long.reverseBytes().

Allocate temporary only if needed and initialize it from
the correct register.

Change-Id: Ifdc0e8b586e1ef90fb817687eb86e05fba1dadbe
Merge "Fix intrinsic Long.reverseBytes()."
tools: use '/usr/bin/env python' instead of '/usr/bin/python'

* This is how it is done in other scripts in the AOSP tree, as
  '/usr/bin/python' may be python3 on some distros, which isn't
  supported yet.

Change-Id: I0d9857fc6a122f505953fddcd6244dad75b1838a
Delta-encoding of mapping tables.

Both PC offsets and dalvik offsets are delta-encoded. Since
PC offsets are increasing, the deltas are then compressed as
unsigned LEB128. Dalvik offsets are not monotonic, so their
deltas are compressed as signed LEB128.

This reduces the size of the mapping tables by about 30%
on average, 25% from the PC offset and 5% from the dalvik
offset delta encoding.

Bug: 9437697
Change-Id: I600ab9c22dec178088d4947a811cca3bc8bd4cf4
Unsafe.compareAndSwapInt()/Object() intrinsics for x86.

Bug: 11391018
Change-Id: I0a97375103917b0e9e20f199304c17a7f849c361
Merge "Delta-encoding of mapping tables."
Merge "Unsafe.compareAndSwapInt()/Object() intrinsics for x86."
Merge "tools: use '/usr/bin/env python' instead of '/usr/bin/python'"
verifier: Bypass monitor-{enter,exit} depth checks

Per Google Bug 61916[1], the monitor-enter and monitor-exit checks in
dex2oat are excessively strict and will reject some valid APKs, such as
WhatsApp[2].  This change attempts to relax those requirements.

[1] https://code.google.com/p/android/issues/detail?id=61916
[2] http://forum.xda-developers.com/showthread.php?t=2525044

Signed-off-by: Kevin Cernekee <cernekee@gmail.com>