Fix #668: ICE if 1st procedure closed and 2nd one opened in the same line

cProgram() will do an astAddAfter() to insert a LIT node (holding the
current line of code in text form) above the code generated for the
current line, for debugging purposes.

To do this it needs to know a reference node, behind which the LIT node
will be inserted. Often this will be the 2nd-to-last (penultimate) node,
but if the current line results in multiple astAdd()'s then that doesn't
work.

Before this patch, cProgram() used astGetProcTailNode() to find the last
node before the cStatement(), then use that as reference afterwards.
The problem with this is that the "current procedure" can change during
the cStatement(). If it does, the astGetProcTailNode() result is useless,
because it corresponds to a different procedure. astAddAfter() can only
add nodes to the current procedure though.

So, cProgram() also used astGetProc() before and after cStatement(), to
find out whether the current procedure had changed, in order to skip the
astAddAfter() in that case.

However, comparing the two astGetProc() results is not safe: It compares
the addresses of the PROC ASTNODEs, assuming that the address will be
different if it's two different procedures, and equal if it's the same.

This assumption breaks in a case like this:

	sub foo
	end sub : sub bar
	end sub

Here we have one line which closes the current procedure and opens a new
one, during the one cStatement(). "foo" will be emitted/flushed from the
AST to IR immediately, because it's not PRIVATE and not main(). Then it's
ASTNODE is freed, and can be re-used for the new procedure "bar", if there
are no other ASTNODEs created in between.

Instead of relying on ASTNODEs, the comparison in cProgram() should perhaps
have used the FBSYMBOLs, as they generally live longer, though #undef could
probably be used to break that too.

This patch changes cProgram() to search for the last
DBG( AST_OP_DBG_LINEINI ) node and insert the LIT node after that,
instead of relying on astGetProcTailNode(). The AST_OP_DBG_LINEINI node
is astAdd()'ed from cProgram() too, directly before the old
astGetProcTailNode(), so the new code will often do the same, except that
it won't break if the current procedure changes, because no ASTNODE
addresses are assumed to stay valid anymore.