machine integers implemented with (java) primitives or big integers in the java backend

A test if failing due to a problem with Id2String. Fixing it requires #289. Please review the rest in the meantime.