updated for new go/types API

Only updated to the point that everything
compiles, and examples appear to work correctly.

3 FIXMEs are left in code.