webdav: support redirecting to next replica for NOT FOUND or FORBIDDEN responses

To support the concept of federation, clients must survive catalogues or other
starting points containing incomplete or out-of-date information.  In particular,
a starting point could redirect a client requesting some data to a storage system
that no longer contains that data or that applies additional constraints on which
users may read that file.

A normal WebDAV implementation would return an error to the client, so failing
the request.  This is undesirable as, no matter how active the starting point is
at maintaining its state, there is always the possibility for the information to
become stale.

The solution adopted by CERN is to encode a stack of replicas in the query-string
part of the request.  With WebDAV, this is not used for anything, so can carry
this extra information.

This patch adds support for redirecting the client to the next replica, if there
is an error and an additional replica is known.

Target: master
Request: 2.7
Request: 2.6
Patch: http://rb.dcache.org/r/6359
Acked-by: Gerd Behrmann