Move functions from valuepair.c to util.c

So that they can be used by radattr
Add xlat to radattr

And fix a number of xlat bugs