Only call xhr.abort() on error cases in polling-xhr.js

How about this as a fix for #318?