This makes it possible to use it for tracking proofs and not only
transactions. Only uint256 or subclasses are supported as an InvId
due to the copy constructor.
Next steps are to update the names of the files, variable, comments and
public interfaces from tx to inv.
Depends on D9567.