Issue 6801 borrowck closures

I factored the commits by affected files, for the most part. The last 7 or 8 contain the meat of the PR. The rest are small changes to closures found in the codebase. Maybe interesting to read to see some of the impact of the rules.

r? @pcwalton

Fixes #6801