Register snapshots.
Transition to new `Hash`, removing IterBytes and std::to_bytes.
auto merge of #12492 : huonw/rust/snapshots, r=alexcrichton

Replaces IterBytes with the new Hash, removing all trace of the old implementation.