internal/export/idna: first implementation of UTS 46

This passes all the “positive” tests and most “negative” tests
(about 2*800 remaining).

This is not yet optimized for performance.

The Punycode code was copied from x/net/idna.

Updates golang/go#17268

Change-Id: Ia8b64483ebb6bb23a5b2b9f5ad4727b80754e43d
Reviewed-on: https://go-review.googlesource.com/30550
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