Fix bugs in unused resource detector

First, look at the text node children of <style> tags to pick up
references to resources, such as @dimen/foo or ?attr/bar.

Second, look at the XML files for declarations of resources; these
provide the actual location of the unused resource (which is stored in
a map for the error reporter), as well as makes the lint work on
source trees that do not have a built gen/ folder.

Third, make the detector use the project-provided source paths rather
than being hardcoded to src/ and gen/.

Fourth, ignore R.style unused warnings since these can be false
positives and will require some more analysis.

Move some constants from checks into the LintConstants class.

Change-Id: Iee062fd7f6452d90716004ef0beb1f869fb57df4
5 files changed