Register snapshots. Convert most code to new inner attribute syntax.

This exposes issue #13067, in which the new inner attribute syntax
is incompatible with macro_rules! `attr` matchers. I had to 'ignore'
compile-fail/macro-inner-attributes.