Generate valid Go code for functions that throw exceptions

At the moment Thrift generates Go code that doesn't compile, when thrift exceptions come into play. This pull request fixes the issue.