Preserve original encoded certificate bytes.

Sadly, the publicly visible android.content.pm.Signature object needs
to return the untouched bytes from the parsed APK certificate.  Since
some CertificateFactory implementations may try re-encoding the
certificate, we defensively keep around the original encoded bytes
and return them when asked.

(cherry-pick of commit 0c990ab4a90b8a5492a67b2b728ac9a4a1ccfa1b)

Bug: 18206852, 18228011
Change-Id: I6016eaea23a7f43cf9249ec43cfde1f8ed4ff841
luni: Disable strict aliasing unless explicitly told otherwise.
Only allow once GC request at a time.

There is no reason to allow multiple, allocating threads may have
multiple GC requests before the GC starts.

Bug: 17942071

(cherry picked from commit 71891f9da2fbcb865931da70ae759032e6698106)

Change-Id: I5e2162373bcef1027eb71e5b1699186ff015f92d
Only allow one requestGC at a time

Fixes possible deadlock caused by Thread.getAllStackTraces

Thread.getAllStackTraces suspends all of the threads. If one of
the threads is a thread which holds the GC daemon lock then we
may deadlock when we allocate the stack trace. This happens if we
get a concurrent GC request when we are allocating the stack trace
elements. To fix the deadlock we now only allow a single thread to
requestGC at the same time.

Credits: yamauchi, hboehm

Bug: 18661622

Change-Id: Ia25598e5daa8ff2dc3aa976148d5ff6afa6960f0
Move GC daemon locking logic into heap

Fixes deadlock caused by acquirng the mutator lock while
synchronizing on the daemon thread.

Bug: 18739541
Change-Id: Ib3ac3788081d3d471195a6e3a8ed163237616a4f