Simplify StackLayout's do_layout.

Simplify StackLayout's do_layout now issue #823 is fixed.