anv: Don't rely on nir_shader after passed to backend

When using NIR_TEST_CLONE=1, the brw_compile_* functions will cause
the original shader to be freed.  So don't rely on information in
them.

Two modifications were needed for this

- Create TES key from TCS key instead of TCS nir_shader;
- Save constant_data so can be passed to anv_device_upload_kernel().

Note since brw_compile_cs does cloning on its own, we don't need to
save anything there.

Fixes: 562448b7 "i965: Do NIR shader cloning in the caller."
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=108957
10 jobs for !912 with r/anv-nir-test-clone in 8 minutes and 17 seconds (queued for 1 second)
detached
Status Name Job ID Coverage
  Containers Build
passed debian #309319

00:00:17

 
  Build+Test
passed meson-clang #309321

00:07:59

passed meson-clover #309325

00:07:26

passed meson-main #309324

00:05:34

passed meson-swr-glvnd #309320

00:04:43

passed meson-vulkan #309326

00:01:54

passed scons-llvm #309328

00:02:39

passed scons-nollvm #309327

00:03:45

passed scons-swr #309322

00:04:57

passed scons-win64 #309323

00:06:36