Follow-up changes for bug 257965 (writing-mode on first region).

Some additional issues were raised and handled during code-review
on the WebKit side:

Add tests where the first region element is invalid and sets
writing-mode. It's invalid because it's inside the same flow
thread that it tries to flow from.

Coding-style adjustments.

Call RefPtr::release().

https://bugs.webkit.org/show_bug.cgi?id=119795

BUG=257965

Review URL: https://chromiumcodereview.appspot.com/23064019

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