Substantial cleanup of camera2 HAL, and some initial unit tests

- Clean up const/struct usage in HAL
- Add user pointer to notify callback
- Revamp allocate_stream, now it picks its own ID.
- Much simpler stream interface
- Merged request/reprocess input queues
- Frame queue interface no longer a mirror of request queue
- Added triggers/notifications
- Added default request creation
- Lots of comments

Unit tests added:

- Lots of utility code to speed up test writing
- Basic open/close
- Capturing 1 raw buffer (request input, frame output, buffer output)
- Capturing a burst of 10 raw buffers

Bug: 6243944
Change-Id: I490bd5df81079a44c43d87b02c9a7f7ca251f531
diff --git a/tests/camera2/Android.mk b/tests/camera2/Android.mk
index 340ec30..325e82d 100644
--- a/tests/camera2/Android.mk
+++ b/tests/camera2/Android.mk
@@ -2,13 +2,15 @@
 include $(CLEAR_VARS)
 
 LOCAL_SRC_FILES:= \
-	camera2.cpp
+	camera2.cpp \
+	camera2_utils.cpp
 
 LOCAL_SHARED_LIBRARIES := \
 	libutils \
 	libstlport \
 	libhardware \
-	libcamera_metadata
+	libcamera_metadata \
+	libgui
 
 LOCAL_STATIC_LIBRARIES := \
 	libgtest \
@@ -21,7 +23,7 @@
 	external/stlport/stlport \
 	system/media/camera/include \
 
-LOCAL_MODULE:= camera2_hal_tests
+LOCAL_MODULE:= camera2_test
 LOCAL_MODULE_TAGS := tests
 
 include $(BUILD_EXECUTABLE)