clarifies the responsibilities of Template and TemplateParameter
introduces an AbstractTemplate that contains generic template code
impacts the existing template types after the refactoring
reifies the responsibility of Substitution.insertAll as an ExtensionTemplate
changes SubstitutionVisitor (allows null targetType, handles cloning of parameters, better variable name for factory)
adds a new test case corresponding to the one that is in the paper
Merge pull request #109 from monperrus/refactoring-template