SERVER-13032 record write errors on failures of shards and lack of progress

Dedicated mongos error code indicating partial results
(cherry picked from commit aaa29361e759a08c9fa9a44e983a962cecacc50b)