url: Fix edge-case in parse where protocol is non-lowercase

When using url.parse(), path and pathname usually return '/' when
there is no path available. However when you have a protocol that
contains non-lowercase letters and the input string does not have a
trailing slash, both path and pathname will be undefined.

---
I based this off v0.10.13 since that was the latest stable branch.
Fixes #5861