HAL: return pretained preview buffer to surface when preview window changed or
camera disconnected.

When preview is paused due to taking snapshot, preview buffer is retained.
However, if UI changes preview window or disconnect, previous preview buffer is
not valid any more, so we need to put it back. Next time when preview is
started, it will act as a clean start of preview and get preview buffer
from display.

Change-Id: Ia3c63e44c3e6d004d3b347a2a3c7d312e2aacdb2
CRs-fixed: 342926

Conflicts:
	QCameraHWI.cpp
	QCameraHWI_Preview.cpp
camera: Fix the lock issue in stopPreview

Avoid preview callback to acquire stop callback lock if
preview stream is not active.

Change-Id: Iea3c7313eb78d5ebb9f86c39e93091a0547390e7

Conflicts:
	QCameraHWI_Preview.cpp
Camera : Synchronization issue in preview callback and stop preview.

stopPreview() can get the lock after mActive check in processPreviewFrame().
Need mActive flag check after aquiring the lock in processPreviewFrame()
to exit the fuction if stop() already issued.
Check for autofocus flag before updating the focus values.

Change-Id: I340e2dc1d4c55d5af18600a13a960e3c215444b2

Conflicts:
	QCameraHWI.cpp
	QCameraHWI_Parm.cpp
Dirty hack to partialy fix video recording