Create address space types and instances only if they aren't empty.

Skip generation of global, constant and local address space typedefs,
if they don't contain any elements.

If there are no elements in the local address space record, its
typedef is not generated. If the local address space record type is
not defined, some compilers (AMD) complain when a variable of that
type is declared, even if that variable is unused and could be
optimized away.

Signed-off-by: Rami Ylimäki <rami.ylimaki@vincit.fi>
Change address space null pointer to a less offending value.

This is required by AMD compiler.

Signed-off-by: Rami Ylimäki <rami.ylimaki@vincit.fi>