port style.rs to syn and add tests for the style checker(backport <https://github.com/rust-lang/libc/pull/4220>)(cherry picked from commit 56e82108afa1e54a4bb1996251d3d79016a092e0)