This has multiple advantages. For one, we can simplify our code, as we
can use globals like os.Stdout and flagsets directly.
It will also be easier to write parallel tests which will run faster, as
each testscript runs concurrently.
While at it, start using $HOME if set, as that is often better than
blindly relying on the current user's home directory via cgo.
Go 1.11 and 1.12 add os.UserCacheDir and os.UserHomeDir respectively, so
soon enough we'll be able to replace most of basedir with those.
Finally, stop having the tests require on the f-droid.org repository to
work. Committing under 2MB of data is plenty to get the files we need in
a static local http server, which makes the tests much faster and not
depend on an internet connection.
Follow-up commits will finish porting the rest of the tests.
I have been moving all github.com/mvdan/... packages to mvdan.cc/...
recently - do this one too.
basedir was only really used by these packages, so merge it in to
simplify building and packaging the tool.