[RFC] refactor includes + improve testing infrastructure

This will allows testing of more files and allow PR #904 to proceed.

Implements a tiny part of issue #918 in the process as well.
In that case, why don't we just do:

```c
typedef uintptr_t long_u;
```

And save @equalsraf a bunch of trouble?