Make `toNerfDart` ignore `query`, `search`, `hash`

@othiym23 Similar to https://github.com/npm/npm-registry-client/pull/73, but not necessarily mutually exclusive. The `toNerfDart` implementation is duplicated across `npm/npm` and `npm/npm-registry-client` and has the same bug. 

- https://github.com/npm/npm/blob/master/lib/config/nerf-dart.js
- https://github.com/npm/npm-registry-client/blob/master/lib/util/nerf-dart.js