rm unused imports reported by pyflakes

Tried to aggressively avoid false-positives, so there are some remaining unused imports beyond these that could probably be removed safely; in particular, there are some in a few Windows-related modules, which I did not look at.