St06 t01: memory leaks in compiler

Special case: @nvanson requested quick merge so he can continue on this code. Responsibility for this task is therefore also transfered to him. This also means that this code is _not_ completely done yet: there is still a consistent memory leak count of 9 in this version.