gp_ir/from_glsl: set cur_nodes to NULL more often

We always assume that after visiting an expression, the extra components
that aren't part of the expression are NULL to avoid potential dangling
pointer situations. However, we forgot to clear any dangling pointers
before visiting an assignment to make sure this happens.
gp_ir: fix the way we delete root nodes

When we unlink the node from its children, we may traverse the list of
root nodes, which means that we must:

1. Unlink the node from its children
2. Remove it from the list
3. Delete it