Layer-to-layer global propagation

We were already good at noticing that a connected parameter's upstreadm
output is guaranteed to be a constant, and then replace the downstream
parameter with that constant (no longer needing the connection at all).

Now we also add logic to notice cases where the upstream output is
guaranteed to be assigned a global variable (such as N or u), and
we can alias the downstream parameter to that global, just as if it
was assigned the global as a default argument in the same shader (also
no longer needing the connection at all).
Fix test reference output
Be less conservative about constant propagation from layer to layer.
It used to do so if the output of the earlier layer was never used in the
upstream layer; I suspected that it's only important for it to never be
written, of course who care if it's read by the upstream layer.  Looks like
this change doesn't break anything, while increasing the number of
connections it can remove by constant propagation.

But, also, DO make sure it's not a parameter that can be overridden by
geometry. I think that might have been a latent bug.