Bug 1063732 - Use flexbox for vertical layout

This makes it easier to have panels pop up without obscuring content,
among other things. To avoid regressions, this patch also rewrites the
build header to use flexbox, which incidentally further improves the
behaviour on smaller screens.
Merge pull request #151 from wlach/flexbox-mainui

Bug 1063732 - Use flexbox for vertical layout