register snapshots
remove obsolete `foreach` keyword

this has been replaced by `for`
rm obsolete `for` support from the compiler
auto merge of #8264 : thestinger/rust/snapshot, r=Aatch