Code duplication cleanup: remove a number of duplicate identical static functions in xc_*_{build,restore}.c, replaced with single (non-static) copy in xc_private.c