Gridview section preparations
The main change here is to break out the tile splitting code as a separate function that can be tested, and rewrite size_allocate to use it.
Along the way, we introduce some helpers, and also prepare get_position_from_allocation for sections.