Java builtin (user-level) substitution

This push request contains an implementation of an user-level substitution mechanism for the Java backend.

Note however that it cannot be used directly instead of the one used in substitution.k because the java engine cannot process that file (and those depending on it).  

I have something written to address that in a separate branch (see  aeff8a8afa9ebf3dc4316d972b3a55a9308f9101 );  however, I would like to push this first as the substitution works and I have a provided a regression test for it.
I'm not totally convinced they are unreachable... they used to be allowed to be variables, in which case we didn't want to handle them. @andreistefanescu  what do you think about this?