Fixed race condition in Spinner.DialogPopup on null reference.

NullPointerException is triggered when DialogPopup is
dismissed due to object mPopup being null when not showing.
Race condition is triggered when dialog is dismissed before
touch event to dismiss dialog has been processed properly.

Fixed by adding a null check prior to accessing mPopup object.

Change-Id: I3c4fe9c279d92a7103fb4f68189d1d42beedc606
Fix dest == src bugs in Matrix.cpp.

The main bug was that the AutoJavaFloatArray autoSrc was not passing in
read only. This meant that the destructor overwrote the data which
the autoDst AutoJavaFloatArray had written in it's destructor.
This case only happened if src == dest and the arrays were copies.
Also improved performance by passing in read only a few other places.

Bug: 12570144

Change-Id: Idc8764087dc165433c584b87a0f9d4ed0ec795e8
AssetManager cookies should be int32_t and not void*.

Cookies are really indices into vectors and arrays, so
they don't need to be void*. We choose int32_t instead
of size_t to allow their width to be well specified.

(cherry picked from commit ebfdd0f467e39c3af8d92cade78263935340acb7)
(cherry picked from commit a7fa2e592e2e579e5acdb903dba83fc074ebc215)
(cherry picked from commit a9d5701b034ed2d9771b3f0943e1add00741d7cd)

Change-Id: I2aed3db568b6fdc487bf99e2c5dd123206736fda
Merge "AssetManager cookies should be int32_t and not void*."
Merge "Fix dest == src bugs in Matrix.cpp."
Merge "Fixed race condition in Spinner.DialogPopup on null reference."