PPAPI: Make GLES2 calls resilient to bad/dead resources.

Currently, if PPB_OpenGLES2 is passed a bad resource, or if a bad resource is
set prior to OpenGLES2 calls, our code happily dereferences a NULL pointer.
This CL tries to address that by handling failure in a way that's consistent
with our other Pepper interfaces.

It also appears that the "old" approach to locking would end up locking twice
per call. Once to get the PPB_GLES2Impl, then unlocked, and then locked
again inside the LockingCommandBuffer (meaning that the PPB_GLES2Impl
might not actually be valid at the time we dereference it!!). This change
simplifies that and removes the old/hacky way of locking.

BUG=275815

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

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