compat: Add macro for creating unique identifiers

Since the __LINE__ macro is the only standard-conforming mechanism we
can use for creating unique identifiers, using this macro at file scope
is only safe in non-header files.
compat: Make _Static_assert usable at file scope

While the old definition of _Static_assert generated an expression, the
new one generates a struct typedef using the __unique_identifier macro.
Using this macro at file scope is only safe in non-header files.

(Obviously, this is irrelevant for C11-conforming compilers.)