add duplicate-sub-deps option flag to npm install + test

```
npm install . --duplicate-sub-deps
```
will install all dependencies even if they are already met on higher levels

Can be useful when folder structure counts. 
also makes install process less unpredictable, see #4037