[CSS Grid Layout] Avoid inserting grid items twice in the grid

Given a grid with one item wrapped by an anonymous block, every attempt to
insert a new grid item before that one will trigger a crash due to a double
call to RenderGrid::addChild for the new item, in the first one beforeChild
is the already present item while in the second is the anonymous block.

We should avoid inserting the new item in the grid twice by using similar
checks to the ones already present in RenderBlock.

BUG=313293

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

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