Test for ref counting on returned rs objects

Bug: 25777125

RS objects are currently cleared before entering return statements.
This leads to
1) Any rs objects referenced inside the return statement are already
cleared and invalid; and
2) Any object returned is cleared and marked invalid for the caller.

A fix is in https://android-review.googlesource.com/184120

Change-Id: I35893318a20b717e3adb0451910f2531177d8d4a
3 files changed