Fix all compiler warnings produced by gcc.

This allows the linux and NaCl builds (and perhaps others)
to be compiles with -Wall and -Werror, and it makes the build
output much less noisy.
Fix all gcc warnings in NaCl build.
Merge pull request #2092 from sbc100/fix_all_warnings

Fix all compiler warnings produced by gcc.