Introduce a gl::BufferState class.

This state can share vital pieces of information with the impl.
The most elementary state is the buffer size, which then the
impl doesn't need to replicate.

BUG=angleproject:1579

Change-Id: I341393c64a6e49de65c1d53b1bad2fa143209862
Reviewed-on: https://chromium-review.googlesource.com/406644
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
diff --git a/src/libANGLE/ResourceManager.cpp b/src/libANGLE/ResourceManager.cpp
index d3dc102..cfb965d 100644
--- a/src/libANGLE/ResourceManager.cpp
+++ b/src/libANGLE/ResourceManager.cpp
@@ -438,7 +438,7 @@
         return bufferMapIt->second;
     }
 
-    Buffer *buffer = new Buffer(factory->createBuffer(), handle);
+    Buffer *buffer = new Buffer(factory, handle);
     buffer->addRef();
 
     if (handleAllocated)