esm: avoid accessing lazy getters for urls
This pull request avoids multiple calls to the protocol
getter of the URL. Previor to Ada version 2, url.protocol
was always returned an already allocated string, but right now, it slices a new string for each call. Storing it in a variable and access it, would make some improvement in terms of performance.
cc @nodejs/url