Various changes to Join macro:

 - The macro no longer allows multiple input fields with the same name and type.
 - Generated code directly access fields of input types.
 - Macro uses list of input/output pairs to drive logic.
 - Macro generates specific type for input parameter in Join.run

This fixes a bug where the original code did not detect that there
was more than one input field that could map into an output field.
comments and rename some functions