Fix most warnings in the compiler.

Two deprecations warnings remain, but they are confined in
Compat210Component.

We also still have the "cannot check for unreachability"
warnings. I wish we could disable those.
Merge pull request #653 from sjrd/fix-compile-warnings

Fix most warnings in the compiler.