SERVER-9469 Set ok field in response to 1 if write was applied

Also removed promotion of writeErrors to top level field errors and made sure that right error fields are used.