Fix java backend

several important fix for the Java backend in order to run/prove list_reverse.cil.c

@andreistefanescu  please review