Fixes #11151, #13388. Minor refactor of response conversion and when/where
 responseXXX fields are set on the jqXHR. Close gh-1164.