Fixes java visitor skeleton

This fixes two problems with the java visitor skeletons:
* it didn't handle user defined tokens properly in case it was used
  multiple times in the same rule
* it wasn't implementing visit methods for internal rules.