Implement grid layout.

Activate via the `grid` boolean attribute.  Requires specifying item width in
addition to item height.