Support the view controller be embedded in container view

Calculate the bottom margin to its enclosing window. This unifies `appropriateTabBarHeight` consideration.