Add a call permission detector, and a thread access detector

This CL adds a lint detector which looks for problems related to
permissions.  For any call to a method which has been annotated with
@RequiresPermission, it

(1) Checks to see if the permissions required by the call are
    satisfied, e.g. are declared in the manifest or this app or any of
    the libraries it depends on

(2) If the permission is dangerous, it makes sure that the call
    handles a potential runtime permission rejection.

It also adds a thread access checker, which looks at the new threading
annotations (@UiThread, @MainThread, @WorkerThread, @BinderThread) and
if it sees a call to a method in a known threading context, and if it
knows the current threading context, it flags errors if the two are
not compatible. For example, it will flag access to Android view calls
from an AsyncTask worker thread context.

Change-Id: I38a2a279963139fc84475d773880181c93ffb5ba
9 files changed