Fix most warnings

Also suppress warnings from Vala generated C code.

The remaining warnings are unhandled exceptions from tests, which we want to
keep that way as the test will fail on an unhandled exception.