JSON response support and some default headers
auto merge of #2590 : Manishearth/servo/xhr-json, r=jdm