Add and use Throwable.UNASSIGNED_STACK from upstream 8u121-b13

Replaces use of EmptyArray.STACK_TRACE_ELEMENT with
Throwable.UNSASSIGNED_STACK to match upstream. Makes it package private
as it is used by java.lang.Daemons.

This has no externally visible functional changes.

The readObject() change to store a clone of UNASSIGNED_STACK in
stackTrace is a change from upstream. It replaces an empty array created
during deserialization with another empty array which will cause the
first to be garbage collected. That should not have any significant
performance or memory impact.

Bug: 35910877
Test: make checkbuild and run CtsLibcoreTestCases
Change-Id: I9133b36f6f952f13705ee480f93fee6c17034f31
4 files changed