added rwlock to ShardingState #797

Modification operations take the shared lock (via
Client::ShardedOperationScope), anything that modifies the chunk version
(setShardVersion, migrations, etc) takes the exclusive lock (via
ShardingState::SetVersionScope).

fixes #797