scripts: add build, cover and update test

This adds a build script that attempts to be as user friendly as possible: if
they have already set $GOPATH and/or $GOBIN, use those environment variables.
If not, create a gopath for them in this directory. This should facilitate
both `go get` and `git clone` usage.

The `test` script is updated, and the new `cover` script facilitates easy
coverage generation for the repo's constituent packages by setting the PKG
environment variable.