Fix lint column offset handling, and add columns to API check

The Lint API specifies that columns should be 0-based (like line
numbers), but in a number of places this was not the case; it was
1-based instead (both in the detector code and in the output code,
which is why things looked okay). This changeset cleans this up such
that the columns are properly 0-based (and adds unit tests for it).

The Location API has a mechanism to search in the source code for
tokens, which is useful for bytecode detectors where we only have line
numbers. This changeset adds tokens to the API detectors such that it
identifies the corresponding method, class or field reference in the
source, not just the corresponding line. It also improves the pattern
search to also look backwards a few lines, since some bytecode
references appear a few lines later than the source code reference (at
the nearest executable code; this is the case for parameter local
variables for example).

Change-Id: I3adac20d5f0075e0a919be15dfb68658d5b7bb11
9 files changed