java/interp: Cache translated code

Signed-off-by: Pekka Enberg <penberg@iki.fi>