Clean up rustc warnings.

These are basically all straightforward changes and should not impact behavior of the language.
@huonw This is because that part of code was previously like this

```rust
#[cfg(target_os = "linux")]
#[cfg(target_os = "macos")]
...
```

but d4ba942b17a7bfde7ae3726218742e6d78fa62b1 was quicker than me in removing warnings on a sequence of `#[cfg()]` to mean `any`.  Then my change after `git rabase` only appear to compact/remove `target_os` clauses.  I didn't see any warnings from `target_os` here.