vet: improve flag handling
Simplify the internal logic for flags controlling what to vet,
by introducing a map of flags that gathers them all together.
This change should simplify the process of adding further flags.

Add a test for untagged struct literals.
Delete a redundant test that was also in the wrong file.
Clean up some ERROR patterns that weren't working.

"make test" passes again.

R=golang-dev, bradfitz
CC=golang-dev
https://codereview.appspot.com/7305075
test: a number of fixes.

Details:
- reorder.go: delete p8.
  (Once expectation is changed per b/4627 it is identical to p1.)
- switch.go: added some more (degenerate) switches.
- range.go: improved error messages in a few cases.
- method.go: added tests of calls to promoted methods.

R=iant
CC=golang-dev
https://codereview.appspot.com/7306087
exp/ssa: special-case 'range' loops based on type of range expression.

The lowering of ast.RangeStmt now has three distinct cases:

1) rangeIter for maps and strings; approximately:
    it = range x
    for {
      k, v, ok = next it
      if !ok { break }
      ...
    }
   The Range instruction and the interpreter's "iter"
   datatype are now restricted to these types.

2) rangeChan for channels; approximately:
    for {
      k, ok = <-x
      if !ok { break }
      ...
    }

3) rangeIndexed for slices, arrays, and *array; approximately:
    for k, l = 0, len(x); k < l; k++ {
      v = x[k]
      ...
    }

In all cases we now evaluate the side effects of the range expression
exactly once, per comments on http://code.google.com/p/go/issues/detail?id=4644.

However the exact spec wording is still being discussed in
https://codereview.appspot.com/7307083/.  Further (small)
changes may be required once the dust settles.

R=iant
CC=golang-dev
https://codereview.appspot.com/7303074
go/types: len(((*T)(nil)).X) is const if X is an array

Fixes issue 4744.

R=adonovan
CC=golang-dev
https://codereview.appspot.com/7305080
exp/locale/collate: moved low-level collation functionality
into separate package.  This allows this code to be shared
with the search package without the need for these two to use
the same tables.
Adjusted various files accordingly.

R=rsc
CC=golang-dev
https://codereview.appspot.com/7213044
runtime: NetBSD/ARM support

R=rsc, dave
CC=golang-dev
https://codereview.appspot.com/7289044
syscall: NetBSD/ARM support

R=golang-dev, rsc, dave
CC=golang-dev
https://codereview.appspot.com/7288050
sync/atomic: support NetBSD/ARM (ARM11 or above)

R=golang-dev, rsc, dave
CC=golang-dev
https://codereview.appspot.com/7287044
go/build, runtime/cgo: cgo support for NetBSD/ARM

R=golang-dev, rsc, dave
CC=golang-dev
https://codereview.appspot.com/7229082
test: ensure all failing tests exit nonzero.

Previously merely printing an error would cause the golden
file comparison (in 'bash run') to fail, but that is no longer
the case with the new run.go driver.

R=iant
CC=golang-dev
https://codereview.appspot.com/7310087
encoding/xml: fix htmlAutoClose and its generating script
Thanks Mitică for reporting this.

R=golang-dev, rsc
CC=golang-dev
https://codereview.appspot.com/7308081