SERVER-12516 Check for change in primary state when recovering from yield in CRUD operations.

Without this patch, a replicaset member running a long-running write operation
that yields might not notice, on yield recovery, that the node is no longer a
primary, and so no longer entitled to perform writes.
SERVER-12516 Update assert code.
SERVER-12657 better validity checks for ns and index descriptors in write ops
Merge remote-tracking branch 'upstream/master'