Refactor some of the code, and switch to DOMDocument for validation

This is possibly worth pushing live once we've reviewed it, as it fixes a couple of user reported bugs. One being xs:anyUri https://github.com/IATI/IATI-Public_Validator/issues/12, the other being that the previous streaming API we were using missed out some validation errors.