Update of lucene code
- update to Java7 compatible constructs
- annotated a few potential NPEs
- general code improvements