Refactor code for unresolved field entrypoint.

- Do macro magic to avoid source code duplication.
- Do not fetch the referrer from the assembly, but
  from the C entrypoint instead.

Test: test-art-host test-art-target

Change-Id: Ib139c94bc8f74686640cad538ba75dc56fa00e1d
14 files changed