This restores the Nix 1.11 behaviour.
As a side effect, this ensures that signatures are propagated when copying paths between stores. Also refactored import/export to make use of this.