Fix for #422 on the 1.7.

Also took the opportunity to reorganize some of the unittests a little
bit.
Backport fix for httpDelete to 1.7

In 89f8fcbaaf7710701fe40e51c126eea858e9bc57 there was a bug fixed where
httpDelete wouldn't check for preconditions. This fix never made it to
1.7.

It seems to fix a testcase in
[vdirsyncer](https://github.com/untitaker/vdirsyncer) when testing
against ownCloud, at least for me this is good enough validation.