nix-prefetch-url: Download file in constant memory
nix-prefetch-url: Download file in constant memory

Before:

  $ command time nix-prefetch-url https://cdn.kernel.org/pub/linux/kernel/v4.x/linux-4.17.6.tar.xz
  1.19user 1.02system 0:41.96elapsed 5%CPU (0avgtext+0avgdata 182720maxresident)k

After:

  1.38user 1.05system 0:39.73elapsed 6%CPU (0avgtext+0avgdata 16204maxresident)k

Note however that addToStore() can still take a lot of memory
(e.g. RemoteStore::addToStore() is constant space, but
LocalStore::addToStore() isn't; that's fixed by
https://github.com/edolstra/nix/commit/c94b4fc7ee0c7b322a5f3c7ee784063b47a11d98
though).

Fixes #1400.

ehmry/nix,layus/nix,vcunat/nix,dtzWill/nix,layus/nix,NixOS/nix,rycee/nix,pikajude/nix,pikajude/nix,layus/nix,dtzWill/nix,ehmry/nix,vcunat/nix,vcunat/nix,layus/nix,rycee/nix,peti/nix,rycee/nix,rycee/nix,pikajude/nix,NixOS/nix,ehmry/nix,NixOS/nix,peti/nix,dtzWill/nix,ehmry/nix,rycee/nix,dtzWill/nix,zimbatm/nix,dtzWill/nix,ehmry/nix,peti/nix,zimbatm/nix,zimbatm/nix,peti/nix,NixOS/nix,layus/nix,NixOS/nix,peti/nix,vcunat/nix,ehmry/nix,zimbatm/nix