Compat headers

This adds some compat headers and moves definitions for some non-standard or long deprecated things over to them. This simplifies the upcoming merge of musl headers and subsequent code.

These headers are found first, and they use ``#include_next`` to get the normal headers pulled in.

Tests pass for ``o1`` (except the one that is broken on ``incoming``).