Add device- and host-side utils for checking API level

Also use these utils in some CTS tests

bug:37205293
Test: run cts, run gts
Change-Id: I4f92ff1421063d2d23bc364018622dcb6090d068
18 files changed