nir: Use the NIR_SRC_AS_ macro to define nir_src_as_deref

We have a macro for this now; no reason to hand-roll it for derefs.
While we're here, move the NIR_DEFINE_CAST for derefs down to where all
the other ones are.

Reviewed-by: Eric Anholt <eric@anholt.net>
14 jobs for !706 with review/nir-src-as-deref in 22 minutes and 5 seconds (queued for 2 seconds)
detached
Status Job ID Name Coverage
  Containers Build
passed debian #254073

00:00:21

 
  Build+Test
passed meson-clang #254075

00:09:16

passed meson-gallium-clover-llvm #254081

00:21:43

passed meson-gallium-clover-llvm39 #254082

00:21:31

passed meson-gallium-drivers-other #254080

00:05:52

passed meson-gallium-radeonsi #254079

00:03:55

passed meson-gallium-st-other #254083

00:04:30

passed meson-gallium-swr #254074

00:08:21

passed meson-glvnd #254078

00:04:21

passed meson-loader-classic-dri #254077

00:04:18

passed meson-vulkan #254076

00:01:48

passed scons-llvm #254085

00:03:08

passed scons-nollvm #254084

00:02:54

passed scons-swr #254086

00:06:23