MDL-48008 gradeimport_xml: report errors usefully
MDL-48008 grade import: fix error handling.
MDL-48010 grade import from URL: don't corrupt the URL.