Teradata support

As per overview in #304 to resolve #168 and #7.
There have also been some fixes to these classes, to the `toString` methods so that they output the data correctly.