Retain expiration on restore

This also adds expiration support to link since they shared some
infrastructure.

The restore support isn't quite right, though.  It should try to
recompute the right time based on modified date or something.

cbugg: close bug-715
Compute restore expiration relative to mod time

cbugg: bug-715