header-bar: Padding and visibility tweaks
- Hide start and end boxes when children aren't visible/there are no children
- Move padding from centerbox to children
Fixes an issue where the center child would receive extra padding when the children on either side were hidden.
As a bonus, this MR also adds prechecks to the packing functions.