Improve Scanner and change lucene to 4.0

Sync up with Luke latest version