Lint infrastructure fixes

This changeset contains various unrelated fixes to the lint
infrastructure:

(1) Tweak the way the classpaths are computed in the default lint
    client method such that rather than reading and parsing the
    .classpath file 3 times, once for each of source-path, output-path
    and library-path, it's now processing it once and storing the
    results for all 3.

(2) Override the lookup-classpath method in Eclipse to directly query
    the Eclipse APIs for obtaining the classpath info.

(3) Add in user libraries found in libs/, since these don't
    necessarily show up in the .classpath file.

(4) Fix a couple of bugs related to checking .class files: First, when
    locating the project for a .class file, lint would search upwards
    for the surrounding project, which meant looking for the nearest
    parent containing an AndroidManifest.xml file.  However, in the
    case of .class files, it will first encounter the bin/ directory,
    which can contain a manifest file, so it would compute a project
    for the bin/ folder rather than its parent, which meant the source
    paths would be wrong.

    Second, the list of class entries to be processed by lint must be
    sorted prior to processing; the code dealing with innerclasses
    depends on that.

(5) Some minor code cleanup: Move some generic utility code and some
    string literals out of specific detectors and into the generic
    utility and constant classes.

(6) Cache results of the lint-project to eclipse-project lookup method
    since that method is called repeatedly with the same (current)
    project.

Change-Id: I33603eed8381ca54314202620cb1bb033e70f775
11 files changed