Camera2: actually fix ArrayAdapter on MoreSettingsPopup

Like CAF already discovered googles attempt to handle the
ArrayAdapter listview does not work as expected if the scroll view
is larger then the screen. CAF tried to fix it with this commit on landscape
view

https://github.com/SlimRoms/packages_apps_Camera2/commit/c5b0bfcf2340f02ca65ad3d8c08b5c7d74776ea1

which is only a dirty workaround fix for the actual root cause and only works
on landscape partly and if the complete layout is loaded new completly not.

Whatever to fix it we need to override and set getItemViewType(int)
and getViewTypeCount() to actually allow to handle propper two row
layouts like it is needed in MoreSettingsPopup (either checkbox layout
or menu layout). The actual detection which type of preference
we need is handled in getItemViewType.

Change-Id: I6b48ca83daa5f10a7783dfa29c63e9c0bc562167
Camera2: fix possible NPE on configurationchange

Step to reproduce:
- open camera from lockscreen
- during it opens turn your phone
- result: crash

Due that the camera is in middle of the initialization mParameters
is null at this point. Just check against null to prevend the crash.
The correct resizing happens so or so during the ongoing initialization

Thanks TJKV from xda for the report

Change-Id: I0aab385172d7ff571adf525004305fd3b34d499c
Camera2: add option to prevend autofocus cancel if preview stopped

There are camera HALs which cannot handle the autofocus cancel call if the preview
stopped in startPreview(). Add an option for this HAL's to do not cancel autofocus in this cases.

Change-Id: I0767cc7279405d17afc0b00120cb43e5bb309220
Camera2: tweak volume key zoom and cleanup

- cleanup unused code
- cleanup codestyle
- add more zoom steps for smother zooming
- show zoom circle indicator during zoom

Change-Id: I5214fc2620a0c5167bfdc8e85f7115966c3b8bcf
Merge branch 'cm-11.0' into mokee