Validate and parse a port string. Returns the port number if valid (integerbetween 1 and 65535), else null.
null
Reject: empty, non-numeric, non-integer, out of range, leading/trailing whitespace.
Sample tests