Fix tag closing issues in the WebVTT tree builder

An end tag </foo> that does not match the currently open element should
be dropped.

An exception to the above however, is the </ruby> end tag which also
closes any currently open <rt>.

BUG=321038

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

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