Fix HTMLMediaElement "direction of playback" behavior.

This change cleans up the code a little to make it easier to see that
the "direction of playback" is being used and corrects the definition of
"forward" to include playbackRate == 0. New test cases were added to
expose the change in behavior.

BUG=385343
TESTS=LayoutTests/media/media-ended.html LayoutTests/media/video-seek-to-duration-with-playbackrate-zero.html

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

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