Camera2: add static metadata check for maxCaptureStall

Also cleanup the cts code a little bit: Auto-unboxing without a null check is
dangerous, the test could crash by the NPE without telling much details of the
actual failure.

Bug: 20670252
Change-Id: Idaeea2fb16df0c472bf458cc5e701314500d4309
3 files changed