Implement collapsing margin

A part of implementation for CSS 8.3.1 Collapsing margins.