Export - put table fields on separate lines
Refacor ExportTableDef code for readability

Hard to follow so replaced array with individual variables.
Currently this code doesn't handle compound keys properly.
Also doesn't handle non-unique indexes at all.