Moving libnativehelper additions from libcore

(cherry picked from commit b66098568f22d672aac3949a39e92d8a474e4b94)

Change-Id: I60381a253af8ee738b1dac8ec124bf13aa7f5f82
Fix build. JniConstants is in libnativehelper, not libcore, in dalvik-dev.

(cherry picked from commit fbdbc836061672d6ea8145ba01e7f3149fb417ce)

Change-Id: I664b55d3f259be5ee8a83de42b4fb021eeb65775
Add InputStream and OutputStream to the well-known classes.

Needed for libcore change f6abc2f4fc2000a34b2ef86eccb83d37c22ef35f.

(cherry picked from commit 9bd4783be0af6ebd8f72e055e72fe40b63af1cda)

Change-Id: I4b84a9e110a6f504694ac8f6e682ebdd238ff8ba
Add Calendar, Object, Object[] to well-known list

Needed for libcore change 75dc9601af8ab3c65114e3c8c57d29ce5ac64125

(cherry picked from commit 5cfc839e8c72a271745245dcebaeccdbfc069153)

Change-Id: Ie2b4593d97c3815af38c12a35e12cb216aa91887
Manually merge JniConstants changes from 81fd7cc0.

(cherry picked from commit 40f73e04d8c37b456224908ad7b57210cba933c2)

Change-Id: I34de4bafbe648a7f3c467028c887c418402c7917
Merge changes I34de4baf,Ie2b4593d,I4b84a9e1,I664b55d3,I60381a25

* changes:
  Manually merge JniConstants changes from 81fd7cc0.
  Add Calendar, Object, Object[] to well-known list
  Add InputStream and OutputStream to the well-known classes.
  Fix build. JniConstants is in libnativehelper, not libcore, in dalvik-dev.
  Moving libnativehelper additions from libcore
resolved conflicts for merge of b50e3d9d to jb-mr2-dev-plus-aosp

Change-Id: If420d6dd7d80810d6768789f3f5ea362c8f11afc
Move jniGetReferent to use JniConstants

Change-Id: Ia99480728245c770169d388f63fae6bcde6ba2cc
Fix punctuation difference in merge resolution

Change-Id: Ib280a03cfa4ebf83244ac84b500a810d63260408
Move more utility classes from libcore to libnativehelper (part 1)

Change-Id: If51679ea9d97ed405d07fb7ccf26489f59ef208d
Merge "Fix punctuation difference in merge resolution"
Merge "Move more utility classes from libcore to libnativehelper (part 1)"
am 66e1bcb7: Merge "Fix punctuation difference in merge resolution"

* commit '66e1bcb78a04c4d75bc12940e81418d815ae2a2d':
  Fix punctuation difference in merge resolution
am 95779265: Merge "Move more utility classes from libcore to libnativehelper (part 1)"

* commit '9577926537ea6668ec4ade67d5758f871e9e5fb3':
  Move more utility classes from libcore to libnativehelper (part 1)
Add swap operation to UniquePtr.

Enables swapping without mPtr ever becoming null. Required by
https://googleplex-android-review.googlesource.com/#/c/250540/

(cherry picked from commit be7922da0cf9b759f01f09b5f259e083f8d1f0b8)

Change-Id: I06ec54e174d251cd2938efba8e628d0eaf6ebcc5
Merge "Add swap operation to UniquePtr."
am 442a079e: Merge "Add swap operation to UniquePtr."

* commit '442a079ec17770e6b0fa912b0c1e26c2dc64af8a':
  Add swap operation to UniquePtr.
Move ScopedFd from libcore to libnativehelper (part 1)

Change-Id: I01941409001107ff1825a56919cdbea6fa017fa5
Merge "Move ScopedFd from libcore to libnativehelper (part 1)"
am 89544997: Merge "Move ScopedFd from libcore to libnativehelper (part 1)"

* commit '89544997f88c808a03865ac7b3eac217f6cf036f':
  Move ScopedFd from libcore to libnativehelper (part 1)