ART: Tolerate shallow call stack in VMStack_getCallingClassLoader

When the call stack does not have the three methods we expect,
the visitor will return a nullptr value.

Add a test to JniTest (and refactor the test a little for code reuse).

Bug: 16867274

(cherry picked from commit 61bf6a1c80bf797af5d7911ff71fc367fdb36742)

Change-Id: I5fb8f91f372a41e0bc11ef9f70640834591afa53
3 files changed