Move EXPECT_THROW_MSG to tests/util.h.
Fix warnings.
Fix more warnings.