nodePackages: add support for recursive dependencies

This is a drop-in replacement that handles nodejs recursive dependencies by
propagating already visited nodejs packages and creating shims for recursive
ones. This implementation handles both, new and old npm2nix output format.
Merge pull request #4018 from offlinehacker/npm_recursive

nodePackages: add support for recursive dependencies