* Avoid using pointer to sync.RWMutex in ServeMux
* Initialize ServeMux.z only when needed.
This means the zero ServeMux is now valid and empty.
* Add benchmark for ServeMux.match
* Use strings.ToLower once in ServeMux.match
strings.ToLower has a special path for ASCII-only (which q always should
be), and avoids all allocations if the string is already lowercase
(which most DNS labels should be).
* Move NextLabel into for clause in ServeMux.match
* Make ServeMux.ServeDNS easier to read
* Fix the documentation of ServeMux.ServeDNS
* Invoke HandleFailed directly in ServeMux.ServeDNS
* Bail early in ServeMux.match if Handle never called
* Fix typo in ServeMux.match
* Improve documentation of ServeMux
This just splits the massive wall of text up so it's easier to follow.
* Fix typo in ServeMux.HandleRemove documentation
* Replace strings.ToLower with once-allocating version
strings.ToLower allocates twice for uppercase ASCII which causes an
overall regression for this changeset. By writing our own custom version
here we can avoid that allocation.
When https://go-review.googlesource.com/c/go/+/137575 lands in a go
release this can be removed.