Add functions for doing a deep copy of a TYPEDESC into a flat buffer. Copy VARDESC structures returned to calling applications instead of passing a pointer to the master structure used internally.