Fix Axis.Category position bug caused by mistake in table layout
Fix works by setting the width and height of component sooner, and
ensuring that it is never greater than offered width.

Code is also cleaner.
Add a unit test.
Close #1188.
Merge pull request #1191 from palantir/axis-category-incorrect-position-1188

Fix Axis.Category position bug caused by mistake in table layout