layout: Adjust the position of block formatting contexts based on float
placement.

Improves Reddit considerably.

Closes #3456.