Major refactor: Make resources access through app.

1. Make the camera device avaiability a callback event so the process can be
event-driven.
2. Add ModuleManager interface and implementation.
3. Make AndroidCameraManagerImpl implementation package private.

This CL is the refactoring work on Gallery2 side. The other part is
http://ag/389297/

Known issue: only work for normal photo mode and video mode for now.

Change-Id: Ib0a89ca56c00f6a7294192e9737a70dec5143ee3
19 files changed