rtl.bi: Remove some unused #defines/declarations
C backend: Add proc/scope block stack to handle scoped UDT declarations

The C backend is using multiple output "sections" (somewhat similar to the
ASM backend) for storing the output code.
It only wants to emit procedure/UDT declarations that are actually needed,
but no unused ones. That information is only completely available after
the FB parsing has finished. Since emitting happens in parallel on a
procedure-by-procedure basis, the information isn't available yet during
irEmitBegin(), but only during irEmitEnd() after finishing parsing.

For this to work out we need to insert the global declarations into the
generated C code, above all the procedures. This can easily be done by
using two separate output buffers: one "header" for global declarations
and one "body" for procedures. Then, at the end, the two buffers can be
combined into a single output file.

The new stack mechanism adds additional sections for each procedure/scope.
Toplevel's header and body sections still exist at index 0 and 1, but now
each scope creates a new section too, allowing sub-scopes to append local
UDT declarations to the body of their parents, before their bodies
themselves are appended to the parent section's body.

For example, given this FB code:

	sub foo( )
		type UDT1
			i as integer
		end type

		scope
			dim x as UDT1
		end scope

		scope
			dim x as UDT1
		end scope
	end sub

the C backend would previously generate

	void FOO( )
	{
		{
			typedef struct _UDT1 {
				integer I;
			} UDT1;
			UDT1 X$;
		}
		{
			UDT1 X$;
		}
	}

which is wrong. It did that because local UDT declarations were emitted
in the scope they were first used, not taking into account that they
actually needed to be emitted at the scope they were declared, to be
visible to following scopes.

Now it works like this:

1. procedure begin
  1.1. open a new section
       (will be at index 3, since 0 and 1 are used for the toplevel)
  1.2. emit the procedure begin into it
       (i.e. the "void FOO( )" and "{" lines)
2. scope begin
  2.1. open a new section
  2.2. emit the scope begin into it ("{" line)
3. var DECL
  3.1. emit the UDT declaration needed for this variable declaration
    3.1.1. temporarily switch to the section corresponding to the
           scope level of the UDT (here it's the procedure's section)
    3.1.2. emit the UDT declaration there
    3.1.3. switch back
4. scope end
  4.1. emit the scope end into the scope's section ("}" line)
  4.2. close the scope's section
    4.2.1. append the scope section's text to the parent section
    4.2.2. remove the section from the stack
5. scope begin
  5.1. open a new section
  5.2. emit the scope begin into it ("{" line)
6. var DECL
  6.1. the UDT declaration needed for this variable was already emitted,
       nothing to do
7. scope end
  7.1. emit the scope end into the scope's section ("}" line)
  7.2. close the scope's section
    7.2.1. append the scope section's text to the parent section
           (parent = the proc's section, here)
    7.2.2. remove the section from the stack
8. procedure end
  8.1. emit the proc end into the proc's section ("}" line)
  8.2. close the proc's section
    8.2.1. append the proc section's text to the parent section
           (parent = the toplevel body section, here)
    8.2.2. remove the section from the stack

and now the generated C code is correct:

	void FOO( )
	{
		typedef struct _UDT1 {
			integer I;
		} UDT1;
		{
			UDT1 X$;
		}
		{
			UDT1 X$;
		}
	}