arm: More UBSan cleanups after additional full-system runs

Some incorrect casting to IntRegIndex, and a few uninitialized members
in the i8254xGBe device.
arm: Use MiscRegIndex rather than int when flattening

Some additional type checking to avoid future issues.
misc: Fix issues identified by static analysis

Another bunch of issues addressed.