Add a typevar substitution function

This allows one to pattern match against one
symbolic type, than substitute the matches
into another
Merge pull request #76 from mwiebe/ndt_substitute

Add a typevar substitution function