[GStreamer] Media attribute preload="none" is not honored
https://bugs.webkit.org/show_bug.cgi?id=114357

Reviewed by Philippe Normand.

Source/WebCore:

Fix the logic that prevents live streams from being buffered to not make preload="none" ignored.

Test: http/tests/media/video-preload.html
We need a http test because the bug does not triggered with local files.

* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::MediaPlayerPrivateGStreamer):
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
(MediaPlayerPrivateGStreamer):
Remove m_originalPreloadWasAutoAndWasOverridden because it is not necessary and it is causing this bug.
Currently if the tag has preload="none" attribute we set m_preload to Auto in the constructor. After that
MedaPlayer calls setPreload(None), so we set m_originalPreloadWasAutoAndWasOverridden to true and later
reset m_preload to Auto. The error prone factor here is that the m_preload member is repeated in the
private class and setPreload is also used there. This seems to be necessary because we need to be able
to ignore preloading if this is a live stream. Fortunately the original parsed value is available in the
constructor, so we can use that. This will give the correct value that we should override only in the case
of a live stream and that's it, we don't need to reset it later to Auto.
Furthermore, we should ignore setting preload to auto from js if it is a live stream. This patch also handles
this with an early return in setPreload.

LayoutTests:

* http/tests/media/video-preload-expected.txt: Added.
* http/tests/media/video-preload.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@148840 268f45cc-cd09-0410-ab3c-d52691b4dbfc