Add recursive directory substitution support to substituteAll

This allows, for instance, to write complex modular configuration files with substitutions and then use them as such (for nginx):
```
services.nginx.config = let
    configs = pkgs.substituteAll {
      src = ./nginx;

      nginx = pkgs.nginx;
      inherit phpfpm_sock;
    };
  in "include ${configs}/nginx.conf;";
```