Introduce a dependency injection convention

The convention provides a standard way of constructing interface
values and wiring them together with their dependencies. Runtime code
then has a simple way of obtaining a default value of an interface.
Test code can inject mocks and stubs for dependencies as necessary.

The convention involves some "wiring" functions typically defined in
the file wiring.go.

The convention associates an interface with a pair of functions of the
form:

* Wire(<parms>, <depParms>) (<InterfaceType>, gerror.Gerror)
* WireWith(<parms>, <dependencies>) (<InterfaceType>, gerror.Gerror)

where <InterfaceType> indicates the interface type being constructed.
gerror.Gerror is returned, although the caller may treat that as an
error.

If there is one interface in a package, then the function names are
"Wire" and "WireWith". If there is more than one interface in a
package, the function names are decorated, for example "WireFS" and
"WireFSWith".

Wire(<params>, <depParms>) constructs a default value of the interface
with dependencies injected. <params> indicates any construction
parameters, usually not of interface type. <depParms> indicates any
additional parameters needed to construct the dependencies. Wire()
typically constructs any dependencies by passing <depParms> to the
Wire() functions of its dependencies and then calls WireWith() passing
<params> and the constructed dependencies.

WireWith(<parms>, <dependencies>) constructs a special value of the
interface with the specified dependencies. This is used by Wire() to
create the default value. It may also be used by test code to create a
value in which some or all of its dependencies are mocks or stubs.
WireWith should not normally be used outside its package or the test
package.

The Wire and WireWith functions are placed by convention in the file
wiring.go, although this convention is not enforced. The complexity of
wiring.go is minimised by having WireWith call a private function in
another file to construct the value. The private function is typically
of the form:

newXXX(<params>,<dependencies>) (<InterfaceType>, gerror.Gerror)

where XXX is usually the interface type name, but more generally
identifies the concrete type which implements the interface, for
example when the package provides more than one implementation of
the interface.
Merge branch 'wiring'