expat_source: improve XML error message

We still have to switch to a custom exception.
Introduce curl_exception and switch downloads (mostly) to exceptions