Re-land "WebGL: Free temporary GPU resources held by inactive or hidden WebGL."

r177854 reverted r177827, the given commit, because it seemed to cause gpu bots crash.
However, r177833 actually caused the crash and r177827 was innocent.

> WebGL: Free temporary GPU resources held by inactive or hidden WebGL.
>
> This CL applies Canvas 2D change in r165966 to WebGL
>
> TEST=fast/canvas/webgl/webgl-composite-modes-tabswitching.html,
> DrawingBufferTest.verifySetIsHiddenProperlyAffectsMailboxes
>
> BUG=391400
>
> Review URL: https://codereview.chromium.org/251023004
>
> git-svn-id: svn://svn.chromium.org/blink/trunk@177827 bbb929c8-8fbe-4397-9dbb-9b2b20218538

BUG=391400

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

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