intel/tools: Fix aub_file initialization in intel_dump_gpu

The `device` can be set earlier either by a command line or a by
intercepting an ioctl call to get the I915_PARAM_CHIPSET_ID done by
the application early.  In both cases `aub_file` and `devinfo` would
not be initialized.

Fix by splitting the conditions

- `device == 0`: use the FD to get both device and devinfo.
- Or `devinfo.gen == 0`: use `device` to initialize it.

And separatedly, initialize aub_file the first time it is needed.

Fixes: d594d2a0 ("intel/tools: use device info initializer")
Acked-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
13 jobs for !1653 with r/fix-intel-dump-gpu in 8 minutes and 6 seconds (queued for 2 seconds)
detached
Status Name Job ID Coverage
  Containers Build
passed debian #499642

00:00:19

 
  Build+Test
passed meson-arm64 #499651

00:01:51

passed meson-armhf #499650

00:01:49

passed meson-clang #499644

00:07:44

passed meson-clover #499648

00:07:44

passed meson-i386 #499652

00:01:55

passed meson-main #499647

00:05:06

passed meson-swr-glvnd #499643

00:05:39

passed meson-vulkan #499649

00:02:47

passed scons-llvm #499654

00:05:34

passed scons-nollvm #499653

00:03:21

passed scons-swr #499645

00:05:26

passed scons-win64 #499646

00:05:32