internal/export/idna: API change to mimic old semantics

ToASCII and ToUnicode now closely mimic the current
definitions in x/net/idna: doing a bare Punycode conversion.
This may be odd, but preserves backwards compatibility.
The changes also ensure that tables used by unused
validations are dropped.

The new semantics is that the zero Profile does a bare
Punycode transformation. The user can define new
Profiles with additional restrictions. Two high-level
options are provided to mimic the Registration and
Lookup use cases defined in the RFC.

validateAndMap is identical to the code that was
removed from process.

Updates golang/go#18567
Updates golang/go#18582

Change-Id: If9e1a1037f968758c1b3f150860773770d032f4e
Reviewed-on: https://go-review.googlesource.com/36512
Run-TryBot: Marcel van Lohuizen <mpvl@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
4 files changed