Camera2 Legacy: Connect to surfaces it produces

When legacy camera device is the producer of its output surfaces,
it needs to connect to the surfaces before using the surfaces
and disconnect from the surfaces after finishing using the surfaces.

Bug: 27331537
Bug: 27383242
Change-Id: Ia3e2ca142f7973face0f60fbfc96935054aac1c4
4 files changed