radeonsi/nir/tgsi: move the nir -> tgsi info scanner to common code.

For llvmpipe NIR support this scanner is pretty much required at least
for initial transitioning, lets move to shared code and reformat it.
22 jobs for !1770 with nir-tgsi-scan-common in 46 minutes and 33 seconds (queued for 3 minutes and 48 seconds)
latest detached
Status Job ID Name Coverage
  Containers Build
passed #536674
debian

00:00:20

 
  Build+Test
passed #536683
meson-arm64

00:03:55

passed #536682
meson-armhf

00:03:14

passed #536676
meson-clang

00:06:58

passed #536680
meson-clover

00:06:50

passed #536684
meson-i386

00:04:32

passed #536679
meson-main

00:10:28

passed #536675
meson-swr-glvnd

00:04:43

passed #536681
meson-vulkan

00:02:04

passed #536686
scons-llvm

00:04:51

passed #536685
scons-nollvm

00:04:44

passed #536677
scons-swr

00:07:26

passed #536678
scons-win64

00:03:50

 
  Test
passed #536687
test-llvmpipe-gles2 1/4

00:03:44

passed #536688
test-llvmpipe-gles2 2/4

00:03:52

passed #536689
test-llvmpipe-gles2 3/4

00:05:55

passed #536690
test-llvmpipe-gles2 4/4

00:03:51

passed #536691
test-softpipe-gles2 1/4

00:01:30

passed #536692
test-softpipe-gles2 2/4

00:01:38

passed #536693
test-softpipe-gles2 3/4

00:01:35

passed #536694
test-softpipe-gles2 4/4

00:01:39

passed #536695
test-softpipe-gles3-limited

00:04:17