Restores stack emulation to inlined code.

This reverts commits 3690953f468bf6f609f7a07036015ad393912d0a and
db8f1ee2e98921349c2cb60888231b3466723159.

Change-Id: Iddf2ac250337622f091b99a0c8840d28e2ad19f0
Small refactoring to avoid a latent bug.

JNewInstance mantained a pointer to the enclosing class of the method
wheren the new appeared only to marginally improve dead code elimination.

The problem was that most of the code did not know aobut this pointer and
was not always updated correctly (e.g. by UnifyAST).

Change-Id: If361794afeda8ba6c630c7ed26ea71fb33af35c1