Further import sorting cleanup

Upstream isort made some changes and these are the results.

I've grouped changes into their own commits to make reviewing easy.