Removed spin lock and exchanged it with CountDownLatch
Cleanup imports
Merge pull request #1650 from noctarius/replace-spin-lock

Removed spin lock and exchanged it with CountDownLatch for MapReduce