Make tests pass with lxml and pycurl installed.

Hi,

I'm in the process of getting this repository packaged and distributed in Debian and Ubuntu. I notice however that if python3-pycurl and python3-lxml are installed the tests for this project fail.

The lxml-related failures are because it doesn't make sense to pass the Xml parser xml in a string with an encoding declared. Doing so results in this error:

`ValueError: Unicode strings with encoding declaration are not supported. Please use bytes input or XML fragments without declaration.`

There are two ways of solving this: Either remove the encoding, or pass the Xml as a bytestring. I elected to implement the second method.

The pycurl-related errors are also string vs. bytestring related. Options set on the pycurl object have to be set as bytestrings.

I've made all the tests pass, but haven't done any additional testing.

Please do not hesitate to contact me. Until this lands, and a new release is made, I'll carry this diff as a distro-patch in the packaged version.

Cheers!