internal/tag: factored out tag.Index

tag.Index will also be used by currency and possibly other packages.

gen now also writes types (if there is no stutter) for vars and const.
This allows strings to be of a specific type.

index data in language is now written as consts. No performance impact
was measured.

Change-Id: I1b63a5bc5e54264acd825000df5af67f8ae759a6
Reviewed-on: https://go-review.googlesource.com/13922
Reviewed-by: Nigel Tao <nigeltao@golang.org>
9 files changed