[CSS Grid Layout] Size tracks using a list of all items sorted by span

RenderGrid::resolveContentBasedTrackSizingFunctions() was not spec
compliant because it used to compute content-based track sizes going
track-by-track. The specs clearly specify that instead, we should collect
all items spanning content-sized tracks and process them one by one after
sorting them by ascending span.

The obvious issue in the old implementation is that a grid item spanning the
first track was always processed before a non spanning item in the second
track. That leads to weird track size computations.

Review URL: https://codereview.chromium.org/592803003

git-svn-id: svn://svn.chromium.org/blink/trunk@183657 bbb929c8-8fbe-4397-9dbb-9b2b20218538