[SPARK-1888] enhance MEMORY_AND_DISK mode by dropping blocks in parallel

It's unefficient to drop memory blocks to disk inside a synchronized block as IO is slow. As the TODO says, we just need synchronize selecting blocks to be dropped. So my implementation is: in `ensureFreeSpace`, we iterate entries and select blocks to be dropped. But instead of dropping block inside `ensureFreeSpace`, we can just mark selected entries as dropping, and return these blocks, let the caller do the dropping. When other thread call `ensureFreeSpace` again, they will skip entries that marked as dropping when iterating entries. And the caller, `tryToPut`, will do the dropping before put the new block into entries. In this way, we can do dropping in parallel.
@cloud-fan @andrewor14 
Hi cloud-fan, I think there will be some problem when you doesn't update the `currentMemory`. Assume there are two threads, the first one get the `selectLock` and finished running and release the lock, till now the `currentMemory` is not updated, then the second thread get the `selectLock`, the value of `currentMemory` for the second thread is the same with the first thread, so, the `freeMemory=maxMemory-currentMemory` is use for two times by the two threads. which means the `selectedMemory` for the second thread is smaller than it actually required.