Auto merge of #66681 - Mark-Simulacrum:toolstate-into-bootstrap, r=pietroalbini
Move toolstate checking into bootstrap
This intends no functional changes, merely translates the spread of shell/python into Rust.
One problematic area that I'd like to avoid but wasn't quite able to figure out how is the master branch script which is still in bash/python -- I cared less about that since it is orthogonal to the actual checking that we're doing, though as-is we're duplicating some code across Rust and that script.
r? @kennytm or maybe @pietroalbini