[ci skip] correct docs for conversion
Merge pull request #15646 from aditya-kapoor/correct-conversion-docs

[ci skip] correct docs for conversion
reduce hash lookups and disconnect normalize_port from the options hash
eliminate nil checks in normalize_port
cache protocol on the stack to reduce options hash lookups
only pull :protocol from the options hash once