This is a follow up to #6342. I used clippy to find all the places we called `.clone()` on a `SourceId` or where we passed `&SourceId`. This also involved fixing a large number of other things clippy was complaining about, and running `fmt` on a large number of files.