implement jax.dtype_real + cleanup utils
Created by: PhilipVinc
Jax guys decided they will not add back dtype_real to the public API so let's just remove the workaround and implement it ourselves.
Also cleans up a few methods that are not really used anywhere