Camera2: Fix camera application memory leak

This change fix potential memory leak of camera application
when swith between camera and panorama:

 1. free allocated frames in jni/Mosaic
 2. use application context instead of acitivity context
 3. clear disappearing children of ViewGroup explicitly
 4. remove IdleHandler during camera exit

CRs-fixed: 622518
Change-Id: I2583709489ab2cf1fc20865fe7d2a8f56f2763c9
Merge branch 'cm-11.0' of https://github.com/CyanogenMod/android_packages_apps_Camera2 into cd-4.4
Automatic translation import

Change-Id: Ia44f2b32ee8f174c1a5c96b7b76115e707e2bf26
Merge branch 'cm-11.0' of https://github.com/CyanogenMod/android_packages_apps_Camera2 into cd-4.4
Automatic translation import

Change-Id: I71db9ceeaaae98f8694ebee177d9f1ecd477fe39
Merge branch 'cm-11.0' of https://github.com/CyanogenMod/android_packages_apps_Camera2 into cd-4.4
Automatic translation import

Change-Id: Ifeb5afea49d4dbc7c1f8081e70b2dcfc08cd9913
Merge branch 'cm-11.0' of https://github.com/CyanogenMod/android_packages_apps_Camera2 into cd-4.4