Fix IPv6 address parsing in server name handling
SERVER_NAME values like [::1]:8080 were split with a naive partition(":") call, which breaks on IPv6 literals since they contain multiple colons of their own. This caused the dev server to bind to the wrong address and ignore the configured port, and caused the test client to lose session cookies when requests were made against an IPv6 base URL.