Reduce duplicate in target.go
Introduce new way of testing packages

In order to support external test packges, gogo.Package
has been refactored to be a plain struct, so new Packages
can be created (with care) to allow tests and xtests to be
built as a normal package would be.