Added table trait with tests.

I have focused more on the calculation of the lengths in the tests, this
is just because if they are ok, it should always render the table
perfectly.. if it is off there wil be gaps and such.