Use DOCKER_TMPDIR=/var/lib/docker/tmp for large temp files (rebase/fix of 6456)

Closes #6456

Thanks @rhatdan

Ping @crosbymichael or @vieux.
@crosbymichael We're ignoring `TMPDIR` because it's usually set to some value already and we could only default to `/var/lib/docker/tmp` or `-g /something`/tmp if `TMPDIR` is empty.