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), queries check the chunk version without
the lock.

fixes #797
Merge remote-tracking branch 'origin/master' into ssrwlock
Merge branch 'ssrwlock'