nir: Start functions and tests to implement creating a nir shader from a string

In order to facilitate the writing of tests implement a a function that creates
a shader nir from the string that nir_print writes. This patch implements
the basics to get shader with if/else, loops and some texture operations
handled.

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Status Job ID Name Coverage
  Containers Build
passed #105080
containers:ubuntu

00:20:59

 
  Build+Test
passed #105095
build:make-gallium-drivers-other

00:13:56

passed #105094
build:make-gallium-drivers-radeonsi

00:07:38

passed #105093
build:make-gallium-drivers-swr

00:09:42

passed #105096
build:make-gallium-st-clover-llvm-39

00:09:33

passed #105097
build:make-gallium-st-clover-llvm-4

00:07:56

passed #105098
build:make-gallium-st-clover-llvm-5

00:07:13

passed #105099
build:make-gallium-st-clover-llvm-6

00:06:13

passed #105100
build:make-gallium-st-clover-llvm-7

00:08:21

passed #105101
build:make-gallium-st-other

00:06:25

passed #105092
build:make-loader-classic-dri

00:08:04

passed #105091
build:make-vulkan

00:08:44

passed #105087
build:meson-gallium-clover-llvm5

00:01:39

passed #105088
build:meson-gallium-clover-llvm6

00:02:03

passed #105089
build:meson-gallium-clover-llvm7

00:01:58

passed #105086
build:meson-gallium-drivers-other

00:01:50

passed #105085
build:meson-gallium-radeonsi

00:01:50

passed #105090
build:meson-gallium-st-other

00:01:50

passed #105084
build:meson-gallium-swr

00:02:56

passed #105083
build:meson-glvnd

00:02:26

passed #105082
build:meson-loader-classic-dri

00:01:52

passed #105081
build:meson-vulkan

00:02:51

passed #105103
build:scons-llvm

00:04:19

passed #105102
build:scons-nollvm

00:03:59

passed #105104
build:scons-swr

00:06:36