Move system header includes above valgrind.h include

This allows rustc to be build under msys2's mingw64 gcc
auto merge of #16323 : c-nixon/rust/master, r=alexcrichton

This allows rustc to be built with msys2's mingw64

Fixes #16347.