nir: replace undef with 0 or NaN (nir_opt_undef), collapse FP opcodes sourcing NaN (nir_opt_algebraic), etc.
What does this MR do and why?
It replaces undef with NaN if it leads to better code (such as removing FP opcodes), and with 0 for other ALU opcodes. Undefs used by stores and phis are not touched. There are also workarounds for Viewperf13 in nir_opt_undef.
This will help remove shader inputs and outputs with a new varying optimizer by turning output store parameters into constants.
TODO: Need to check that #2689 (closed) doesn't resurface.