Move function attribute macros into a separate header file.

This new file (src/include/global.h) is intended for anything which is
shared between src/engine, src/gamelogic and src/tools.
Add a few ‘noreturn’ attributes.
Fix a few type mismatch warnings.