XIAPath now allows replacing XID with a new one

Added a function that walks all nodes in the XIAPath and replaces one
matching a given XID with a new one. This allows us to update XIAPath
for source and destination stored in daginfo (socket state).