build.cc: Handle recursive input derivations

If goal's inputDrv specifies an output starting with '!', nix now does
the following:

* it builds the "out" output of the derivation specified in that
  inputDrv
* it verifies that the "out" output of that derivation is a symlink to
  another derivation with the same name
* it rewrites the derivation of the goal by replacing the outpath used
  for the specified output (assumed to be generated by
  recursiveDerivationRewriteHash) to the outpath of that output (without
  the '!') of the linked-to derivation and updates the inputDrv entry
* it starts a new derivation goal for the rewritten derivation and exits
  with the ecReplaced exit code

Additionally, if a goal's inputDrvs exit with the ecReplaced exit code,
*that* goal is also rewritten and replaced, bubbling all the way up to
the top-level derivation goal started by LocalStore::buildPaths.

Future work will include returning the replaced top-level derivation
goals from buildPaths (currently they are printed with lvlInfo) and
providing a nix expression language interface to the feature (at which
point the purpose will hopefully become clearer).