Warning improvements

With these changes we can make Android and WindowsPhone8 builds use WarningsAsErrors and they will still build! :)
I can't figure out how to make protobuild do this though, so it's not done.

Still lots of warnings in other projects, but this with WarningsAsErrors will cover quite a bit of the code base.
Refs #2433