Fix reference leaks in ToReflectedMethod and ToReflectedField

Used ScopedLocalRef to fix, added regression tests.

Bug: 18396311

(cherry picked from commit 8c41753e5eda8322b4d992fe88855058f4c0c2e1)

Change-Id: I0ddfc20ac2384c90ff18586242c1f1d9a6d6eb6d
2 files changed