Move code from HTTPCredentials to more generic locations

This is a preparation to make them usable from the Shibboleth
credentials class.
ShibbolethCredetials: Try to avoid re-auth

...by storing the shib cookie in key chain
Report an error if fetching the etag fails

Very important in case of renames, else, if the server did not perform
the rename, we may end up deleting the files
Also force an update of the etag in case of renames

Imagine we have a file:
  foo/bar/moo
if we do     mv 'foo' 'foo2' and that we issue a MOVE on the server
and will update the entry 'foo' in the database with the new etag
If we write the etag of foo but not the etag of the sub item, when
we read from db on the next sync, we will miss them and beleive they
have been removed on the server