Use event polling instead of blocking when outputting to a file.

This stops some ref tests on linux blocking while waiting for
user input events and never outputting the file.

Also mark vertical writing test as flaky on all platforms. Due
to unrelated timing reasons, this fails reliably on mac when glutin
is enabled. The related bug with details on the root cause is #3926.
gfx: Refactor the border drawing code and split out fragment display
list building into multiple functions.

This should have no functional changes; it's just code cleanup.
gfx: Fix a nasty bug whereby the transient clip was not always removed,
causing elements to be randomly clipped out.

Improves Wikipedia, Reddit, etc.
gfx: Clip the background properly when `border-radius` is used.

Improves Reddit, GitHub, etc.
auto merge of #4459 : pcwalton/servo/border-radius-clipping, r=glennw

Together these improve a large number of sites: GitHub, Reddit, Wikipedia, etc.

r? @glennw
Update glutin to get mac visibility fix.
auto merge of #4461 : glennw/servo/glutin-tests, r=larsbergstrom

This stops some ref tests on linux blocking while waiting for
user input events and never outputting the file.

Also mark vertical writing test as flaky on all platforms. Due
to unrelated timing reasons, this fails reliably on mac when glutin
is enabled. The related bug with details on the root cause is #3926.