fix some race conditions in partition (vbucket) code. there are more still there.