Expose a convertConstant() function.

This allows constants to be created without needing a valid Cfg
object, which is possible because all constants are pooled in the
GlobalContext.  This is needed for handling global initializers.