[golang] added test for GOPATH environment variable

This test will only succeed if the GOPATH variable is set properly.
[golang] set GOPATH environment variable for tests

This helper method will set the GOPATH environment variable (if not set yet)
depending on the environment (travis vs.  vagrant).
[golang] build to temporary file

Writing output of the go compiler to /dev/null is not supported as go checks for
existence of the output and denies overwriting. Added a helper for creating a
temporary filename (without creating the actual file) and sending output to this
file. Flycheck takes care the file is removed afterwards.