Refactor box layout optimization into separate layouter
- Extend AbstractLayouter so subclasses can provide an
  implementation for OptimizeLayout