run_func: use mktemp to create logpipe; restore trap after running func.
Prefix builddir state/log files and destdir with XBPS_CROSS_TRIPLET in cross builds.

This fixes a serious issue:

- xbps-src install-destdir <- native
- xbps-src -a armv6hf build-pkg <- cross built pkg with native files

DESTDIR in cross builds is now set to destdir/XBPS_CROSS_TRIPLET/pkg.