Add optimized applyStackedHeights path and resize handler

For simple stacks (which happen to be the most common) such as
static + fluid or static + fluid + static, the top and bottom positions
can be defined relative to the edges of the stack which prevents
needing to recompute the intermediate positions.