Move PyTorch dispatch macros to the v2 API.
Recent revisions are kept. Restoring one creates a new revision.