nix-store --gc --max-freed: Support a unit specifier

E.g. "--max-freed 10G" means "free ten gigabytes".
Move some code around

In particular, do replacing of valid paths during repair later.  This
prevents us from replacing a valid path after the build fails.
When using a build hook, only copy missing paths
Refactoring
Make --repair work on Darwin

Mac OS X doesn't allow renaming a read-only directory.

http://hydra.nixos.org/build/9113895
Don't build on Debian 6.0

Its linker is too old to understand --no-copy-dt-needed-entries.

http://hydra.nixos.org/build/9113883