minigbm: cros_gralloc: refactor for future HALs

We want the ability to support gralloc0, gralloc1 and HIDL
gralloc in this repo. This commit moves gralloc0 specific code
to the gralloc0 subdirectory, and refactors the rest of the code
so it can be eventually used by whichever APIs we choose to
implement.

In addition, all of the data by the module is now handled by
managed pointers instead of process data, since we get a number
of crash reports when we try to access data in gralloc_close().

BUG=b:62069164, b:62221166
TEST=gralloctest all, Android boots, Youtube videos, 5-10
     CTS tests

Change-Id: Ic29a777573936216d99498d0b814ea50015fd435
Reviewed-on: https://chromium-review.googlesource.com/521794
Commit-Ready: Gurchetan Singh <gurchetansingh@chromium.org>
Tested-by: Gurchetan Singh <gurchetansingh@chromium.org>
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
diff --git a/Android.gralloc.mk b/Android.gralloc.mk
index 4a0b125..ff269c0 100644
--- a/Android.gralloc.mk
+++ b/Android.gralloc.mk
@@ -5,6 +5,7 @@
 LOCAL_CPP_EXTENSION := .cc
 
 LOCAL_SRC_FILES += \
-	cros_gralloc/cros_alloc_device.cc \
+	cros_gralloc/cros_gralloc_buffer.cc \
+	cros_gralloc/cros_gralloc_driver.cc \
 	cros_gralloc/cros_gralloc_helpers.cc \
-	cros_gralloc/cros_gralloc_module.cc
+	cros_gralloc/gralloc0/gralloc0.cc