Fix layout engine issues.

Right now, layout engine will not stop iterating after everybody is
satisfied. Termination will occur only after 5 iterations or there are
no space left. This apporach fixes issue with compotent, which can be
wrapped.

Category axis didn't took into account offered width/hight when checking
if it fits.

Close #936, #1207.
Merge branch 'develop' into layout_engine
Persist layout.
Merge branch 'develop' into layout_engine
Fix rebase.
Change test order.
Update test.
Revert test order.
Rename.
simpler getter.
Merge branch 'develop' into layout_engine
Use text library.
Merge branch 'develop' into layout_engine
Missing file.
Merge pull request #1362 from palantir/layout_engine

Fix layout engine issues.