android: add resource state machine to RenderWidgetHostViewAndroid

We need to ensure freeing resources via AcceleratedSurfaceRelease() does not
compete with async readback and rapid switching between Hide() and Show().  This
change adds a state machine for to abstract out the case handling logic.

Also added public API functions LockResources() and UnlockResources(), which
are intended for future async readback uses.

BUG=326363

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

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