OAK-1156 - Improve the document cache invalidation logic to selectivly invalidate doc

Changes as per review comments
1. Using only modCount for checking if two nodes are same and removing check for lastRev
   as modCount gets changed for changes in lastRev also
2. Using AtomicLong for lastCheck