Clean up cross-platform compatibility.

- Move compatibility macros to a new header file. This will allow us to add more C++11 compatibility macros without polluting inspircd.h.
- Sort system include files in alphabetical order (there is no risk of this causing a problem).
- Clean up signal handling (thanks to Adam).