[SPARK-4721][CORE] Improve logic while first thread put block failed

1. make thread which wait old block info try one by one while the first thread which created that block failed.
2. use reentrantLock instead of this.syn{} in block info.
I'm having a hard time understanding this class.  Can you please add comments to explain it?