Fix the problem of rendering closePath not properly after a moveTo call in
canvas 2D interface. If there is a polyline, followed by a moveTo and a
closePath, both the moveTo and the closePath should be ignored for the purposes
of drawing, and the polyline should not be closed (unless force closed is true
(for filling, for instance).

Tested for path with both valid and degenerate content, when asked to
consume degenerates and not, force closed and not.

This patch also includes a uni test refactoring to reduce the amount of code
to test path iteration and zero length paths.

BUG=6297049

TEST=tests/PathTest.cpp, testIter method.
Review URL: https://codereview.appspot.com/6300086

git-svn-id: http://skia.googlecode.com/svn/trunk@4247 2bbb7eff-a529-9590-31e7-b0007b416f81
2 files changed