go.tools/ssa: create thunks for method expressions T.f.

Until now, the same Function was used to represent a method
(T)func() and the "method expression" function func(T) formed
from it. So the SSA code for this:

    var buf bytes.Buffer
    f := Buffer.Bytes
    f(buf)
    buf.Bytes()

would involve an implicit cast (ChangeType) on line 2.
However, compilers based on go/ssa may want to use different
calling conventions for them, like gccgo does (see issue
7839).  This change decouples them by using an anonymous
function called a "thunk", rather like this:

    f := func(r *bytes.Buffer) []byte { return r.Bytes() }

Thunks are similar to method wrappers; both are created by
makeWrapper.

"Interface method wrappers" were a special case of thunks for
direct calls (no indirection/fields) of interface methods.
They are now subsumed by thunks and have been deleted.  Now
that only the needed thunks are built, we don't need to
populate the concrete method sets of interface types at all,
so (*Program).Method and LookupMethod return nil for them.
This results in a slight reduction in function count (>1%) and
instruction count (<<1%).

Details:

go/ssa:
- API: ChangeType no longer supports func/method conversions.
- API: (*Program).FuncValue now returns nil for abstract
  (interface) methods.
- API: (*Function).RelString simplified.
  "$bound" is now a suffix not a prefix, and the receiver
  type is rendered package-relative.
- API: Function.Object is now defined for all wrappers too.
- API: (*Program).Method and LookupMethod return nil for
  abstract methods.
- emitConv no longer permits (non-identical)
  Signature->Signature conversions.  Added assertion.
- add and use isInterface helper
- sanity: we check packages after Build, not Create, otherwise
  cross-package refs might fail.

go/pointer:
- update tests for new function strings.
- pointer_test: don't add non-pointerlike probes to analysis.
  (The error was checked, but too late, causing a panic.)
- fixed a minor bug: if a test probe print(x) was the sole
  reference to x, no nodes were generated for x.
- (reflect.Type).MethodByName: updated due to ssa API changes.
  Also, fixed incorrect testdata/funcreflect.go expectation
  for MethodByName on interfaces.

oracle:
- fix for new FuncValue semantics.
- a "pointsto" query on an I.f thunk now returns an error.

Fixes golang/go#7839

LGTM=gri
R=gri
CC=golang-codereviews, pcc
https://golang.org/cl/93780044
diff --git a/go/ssa/ssa.go b/go/ssa/ssa.go
index 113ba85..9151c97 100644
--- a/go/ssa/ssa.go
+++ b/go/ssa/ssa.go
@@ -28,10 +28,10 @@
 	mode       BuilderMode                 // set of mode bits for SSA construction
 	MethodSets types.MethodSetCache        // cache of type-checker's method-sets
 
-	methodsMu           sync.Mutex                // guards the following maps:
-	methodSets          typeutil.Map              // maps type to its concrete methodSet
-	boundMethodWrappers map[*types.Func]*Function // wrappers for curried x.Method closures
-	ifaceMethodWrappers map[*types.Func]*Function // wrappers for curried I.Method functions
+	methodsMu  sync.Mutex                 // guards the following maps:
+	methodSets typeutil.Map               // maps type to its concrete methodSet
+	bounds     map[*types.Func]*Function  // bounds for curried x.Method closures
+	thunks     map[selectionKey]*Function // thunks for T.Method expressions
 }
 
 // A Package is a single analyzed Go package containing Members for
@@ -268,8 +268,8 @@
 //
 type Function struct {
 	name      string
-	object    types.Object     // a declared *types.Func; nil for init, wrappers, etc.
-	method    *types.Selection // info about provenance of synthetic methods [currently unused]
+	object    types.Object     // a declared *types.Func or one of its wrappers
+	method    *types.Selection // info about provenance of synthetic methods
 	Signature *types.Signature
 	pos       token.Pos
 
@@ -548,7 +548,6 @@
 //    - between a named type and its underlying type.
 //    - between two named types of the same underlying type.
 //    - between (possibly named) pointers to identical base types.
-//    - between f(T) functions and (T) func f() methods.
 //    - from a bidirectional channel to a read- or write-channel,
 //      optionally adding/removing a name.
 //