Port camcorder touch-to-focus feature from CAF

Change-Id: I86ec05955298bc04a7254844220aae1fb119895f
Camera App: return after synchronized block

For some boundary condition when surface allocated is null, due to
return within synchronization block it is giving ANR. This change
will ensure that return take place outside synchronization block.
It will also ensure to notify an object if already in wait state
before invoking wait on it.

CRs-Fixed: 529666
Change-Id: I8532aa410840785923388a879701be9e98b0154f
Gallery2: Clear undefined buffer before first draw

Clear undefined buffer before first draw.

Crs-fixed: 526603 523916
Change-Id: I1cfdb621bdcf08dc8994adddb0111a1aaf941f56