webkit: Support video frame capture for HTML5 canvas use cases

Includes several patches cherry-picked from jb branch.

[webkit] Expose check for playlist types to WebKit

Need to black list types that may have multiple security origins. The
MediaPlayer should be the source of this knowledge.

Change-Id: Ice5a73f94f389e9d74804d9f0a0f4746a35ae79d

[webkit] Set the visibility of the video element from JNI

Avoid invalidates of FrameView when video is not visible.

Change-Id: I25065ed8771dae3a72248df40d66f2e9006ac797

Conflicts:

	core/java/android/webkit/HTML5VideoView.java
	core/java/android/webkit/HTML5VideoViewProxy.java

webkit: Notify native MediaPlayer when the first video frame is available

This callback will be used by the webkit MediaPlayer to advance the
ready state. This provides a more accurate mapping of ready states to
the state of the framework MediaPlayer.

Fixed bug where video playback cannot be started after preloading
metadata.

Change-Id: I5312fc9e1b742e1862fdfa2304e554ae3cdb2b2e

Conflicts:

	core/java/android/webkit/HTML5VideoFullscreen.java
	core/java/android/webkit/HTML5VideoView.java
	core/java/android/webkit/HTML5VideoViewProxy.java

Add native layer callback to update media player state

Native video layer needs prompt updates on media player state changes
so that it can composite the video frame as soon as possible.
Video frame capture also needs up-to-date media player state so that
it does not capture empty frames when media player is ready.

Previously, media player state updates to native layer are only done
when a new base layer is set.

CRs-Fixed: 426323
webkit: Fix for unable to play youtube in browser

Youtube video was not playing because it is getting paused during
load by HTML5VideoViewProxy in the setBaseLayer call.  Fixed by
adding a condition in setBaseLayer to only pause the video if the frame
available notification has been sent.  The frame available flag in
HTML5VideoViewProxy should only be set after the native media player has
been notified.

Renamed onVideoFrameAvailable function for consistency and readability.

Change-Id: I9dcca5447c0d8697031441d43d91c2c0ed83be00
CRs-fixed: 458557
webkit: Manage video playing state properly when browser goes to background

When the browser activity goes to background while video is playing in
fullscreen mode, two things happen around the same time. The native media
player resumes the video playback using the inline video view while the
BrowserActivity notifies WebView that activity is going to the background
which in turn pauses the video. Depending on the order of these calls,
the play call may happen after the pause which causes video to resume
while the browser activity is in the background.

This is fixed by handling the video state properly during exit
fullscreen so that the messages may arrive at any order and the browser
still behaves correctly.

Change-Id: Ie7e037ecde7663b8cac704e3ab56a064bd52f6cf
CRs-fixed: 451660