take more care with v6 literals and port numbers

with a v6 literal, the existing port number override will take the last 16 bits of the v6 addr as the port number.

propose checking for a [v6:literal]:portnum combo by the existence of square brackets, and modify the match appropriately for v4/v6, but otherwise leave semantics intact.