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

@othiym23 corresponding fix for https://github.com/npm/npm-registry-client/pull/74, and 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