Handle xhrs with invalid or no JSON responseText
Better xhr error handling

If an exception is raised trying to parse the responseText of a failed
XHR, it is now caught and an appropriate notification is displayed.
Remove useless line
Merge pull request #750 from hdgarrood/error-handling

Better XHR error handling