Fix bug: "TypeName specified for parameter '@table'.  

... TypeName must only be set for Structured parameters."
 
I started fixing this bug that TVPs caused, it was caused by the new test in this PR. 
This sent me on a refactoring trip! 

Now using Union cases / Records to pass params around instead of string concat/split. To me this is more readable. 

What do you think of the changes?