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.
This goes for a few other attributes, like strict and function. We should have a check in kompile that ensures productions have consistent attributes. @dwightguth can you take care of it?