General code cleanup

- Fix a NPE
- Remove some unused methods
- Remove some unused variables
- Slap some @SupressWarnings on junk in lucene-2.1 that use raw types
- Fix up some dead code paths

Change-Id: I41b4b6f2ff2cc006a230702d6e5ec59b0a583967
Merge "General code cleanup"