Overhaul of #includes.

- Alphabetise (not just OCD, but easier to read.)
- Use config.h for stdbool/stdint for MSVC compatibility.
- Two newlines between #include and code for style.