Camera2: Check memory status when in longshot mode

1> When memory can be used by application is smaller than 40MB,
need cancel longshot.
2> When system memory is limited, need cancel longshot.
3> When longshot begin, also check the memory status.
4> The thresholds can be changed based on Customer requirement.

CRs-fixed: 654291
Change-Id: I0d4688fe13c8c28a4fda4e9ac9c2257302201ae5
2 files changed