msm: native: fix memory leak during snapshot

The JPEG buffers were being allocated from the MM ION heap during
snapshot. However, the Jpeg buffer fd wasn't being closed because
of which there was a memory leak. This bug crept in because of a
recent change that removed use of PMEM for JPEG memory allocation.

This is port of:
https://www.codeaurora.org/cgit/quic/la/platform/hardware/qcom/camera/commit/?h=kk_2.7_rb1.21&id=4ca6b47299da802a2975884559da4c8fed5ed76c
Do not release the jpeg buffer twice
Camera: Fix for main image corruption

Use proper luma offset while registering the snapshot buffer with
kernel. In the present code luma offset is hard coded to 0 when
registering , this holds good only when the image height is a
multiple of 16.But, for the cases where the image height is not
a multiple of 16 and for the jpeg rotation values of 90 and 180,
the luma offset is calculated differently and it becomes a non
zero value.So, use this calculated luma offset value instead
of hard coded 0 when registering the buffer.

This is port of:
https://www.codeaurora.org/cgit/quic/la/platform/hardware/qcom/camera/commit/?h=kk_2.7_rb1.21&id=4777aa1f7fccfbf70ea5a303efa14e423c9efb40
Restore mDataCallback call from receiveRawSnapshot
Enable debug print to receiveJpegPicture
Store thumbnail handle and pass to encoder
Code cleanup

Cleaning up the code a bit
Fix crash on preview restart
Fix buffer registration in kernel

I've made a mistake merging ION patches resulting in inproper
registration of a buffer in kernel resulting in CMD_AXI_CFG_VPE
ioctl call failure from Qualcomm's proprietary libs.
Camera: Release jpeg buffer memory properly

when in zsl mode the jpeg buffers are not released after each snapshot,
as they are being release at deinitzslbuffers which leads to a memory leak.
Releasing the jpeg buffers after the datacallback resolves the issue.

Change-Id: I85c77041cf268b618931661688d634f965d02f47
Camera: obtain and use the timestamp from camera driver to avoid
jerkiness in recorded clip.

Fix the jerkiness in recorded clip by getting the timestamp from camera
driver instead of using the timestamp generated at camera HAL, thus
avoiding thread scheduling dependency.

Adds missing part from commit:
https://www.codeaurora.org/cgit/quic/la/platform/hardware/qcom/camera/commit/?id=1307f31269fc8dbe23161a16e821c347e5bc13be
Pass implicitly all parameters to register_buf function
Remove usage of /dev/pmem_smipool in favor of /dev/pmem_adsp