Fix Javascript errors when switching media while loading a video.

When loading a video from Drive user switch to the next picture and clicked on the screen, then we were getting an error. This was happening because the video was already detached from the media controls, but still available in the image view. This patch addresses this issue by checking if both - video is being displayed and it is attached to the media controls.

TEST=Partly by browser_tests. Manually tested using repro steps in the bug entry.
BUG=305102

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@227674 0039d316-1c4b-4281-b951-d872f2087c98
SVN changes up to revision 227674