Don't consume iterator twice
Rewrite DAV storages' encoding behavior

This is more explicit than the old behavior. See
https://github.com/Kozea/Radicale/issues/128 for the discussion that led
to this.