layout: Introduce a DOM leaf set as a prerequisite for parallel flow

construction.

This will be very slow until we have the concurrent hash table, but we
might as well get it in.

r? @metajack