spirv: Change spirv_to_nir() to return a nir_shader

spirv_to_nir() returned the nir_function corresponding to the
entrypoint, as a way to identify it.  There's now a bool is_entrypoint
in nir_function and also a helper function to get the entry_point from
a nir_shader.

The return type reflects better what the function name suggests.  It
also helps drivers avoid the mistake of reusing internal shader
references after running NIR_PASS on it.  When using NIR_TEST_CLONE or
NIR_TEST_SERIALIZE, those would be invalidated right in the first pass
executed.

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
10 jobs for !913 with r/spirv-to-nir-shader in 11 minutes and 51 seconds (queued for 2 seconds)
detached
Status Name Job ID Coverage
  Containers Build
passed debian #325191

00:00:21

 
  Build+Test
passed meson-clang #325193

00:10:33

passed meson-clover #325197

00:05:12

passed meson-main #325196

00:02:39

passed meson-swr-glvnd #325192

00:03:36

passed meson-vulkan #325198

00:02:46

passed scons-llvm #325200

00:03:11

passed scons-nollvm #325199

00:03:54

passed scons-swr #325194

00:03:16

passed scons-win64 #325195

00:03:55