Make Prime compatible with Haxe version 3.1.2

- New TypeUtil.as implementation, while keeping
  the old one for 3.0.0

- Import a copy of std/UInt.hx, as I don't know a
  way to make 3.1.2 ignore the file and 3.0.0 use
  it, without messing with classpath order...