extra: improve the errors for the JSON Decoder.

Fixes #4244.
auto merge of #10625 : huonw/rust/json-errors, r=alexcrichton

Fixes #4244.