Go: optimize tests

These are some general test optimizations.

This PR should include
- [x] #324
- [x] #327

Please wait until they are in master and I rebased this PR before merging.
For now this PR is just here for discussion and to avoid overlapping PRs.