st/mesa: Use nir-to-tgsi for builtins if the driver needs TGSI
Delete the TGSI code and just use nir-to-tgsi.
This MR is based on !3395 (merged) (except for the last commit) and I tested piglit on softpipe with it. Please review everything else in that MR, and just the last 3 commits here.