DeviceBase: Make object creation use ResultOrError<Ref<T>>

This is in preparation for a change that will change all the
CreateFooInternal to be CreateFoo so they can be called in a
reentrant manner without special refcounting.

This also standardizes all the backends (except OpenGL and Null)
to use Object::Create that returns a Ref<T> or ResultOrError<Ref<T>>,
something we wanted to do for a long time.

Bug: dawn:723

Change-Id: I9e0baced333ffeb0affbc6a276c9bd9de082263a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/46440
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
diff --git a/src/dawn_native/opengl/BindGroupGL.cpp b/src/dawn_native/opengl/BindGroupGL.cpp
index 486eb2c..721189b 100644
--- a/src/dawn_native/opengl/BindGroupGL.cpp
+++ b/src/dawn_native/opengl/BindGroupGL.cpp
@@ -54,7 +54,7 @@
     }
 
     // static
-    BindGroup* BindGroup::Create(Device* device, const BindGroupDescriptor* descriptor) {
+    Ref<BindGroup> BindGroup::Create(Device* device, const BindGroupDescriptor* descriptor) {
         return ToBackend(descriptor->layout)->AllocateBindGroup(device, descriptor);
     }