cvg: Initial commit of new convert tools library

These are functions from CONVERT that may be useful to other
applications.