[CSS Grid Layout] Small refactoring in grid-auto-flow-get-set.html test

Add new helper methods to grid-definitions-parsing-utils.js and use them
in grid-auto-flow-get-set.html. This will ease future modifications of
this test.

This has been done in WebKit as part of r171183:
http://trac.webkit.org/changeset/171183

BUG=384099

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

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