Deadlock fix
Deadlock fix

thread 1 gets lock on indexName, from getNextId, for instance
thread 2 calls synch'd getShardInfo method
thread 1 calls getShardInfo inside of indexName lock, blocks waiting
for thread 2 to finish
thread 2 hits the indexName lock inside of getShardInfo and deadlocks

traced all paths and made some lock changes:
- nextReservedId is only called from inside indexName lock, so no need
to lock it in that method
- almost all calls to getShardInfo were inside of an indexName lock, so
took out the indexName lock in that method
- added an indexName lock around the getShardInfo call inside of
getMaxId, for safety's sake

yonglehou/Solandra,yonglehou/Solandra,aglne/Solandra,tjake/Solandra,yonglehou/Solandra,yonglehou/Solandra,tjake/Solandra,aglne/Solandra,aglne/Solandra,tjake/Solandra,aglne/Solandra,aglne/Solandra,tjake/Solandra,yonglehou/Solandra