Fixed an issue with alignments in TableFormatGenerator

Alignments are now identified by property name, not by psoition, as it
can be arbitrary. Also it's now robust against different objects types,
so an alignment IndexOutOfRange exception won't appear.

This fixes one issue mentioned in #303.