go: fix golint errors and some general cleanup/consolidation.

+ Added comments for exported funcs and fixed some other nits per complaints from golint.
+ Consolidated shorter type definitions into a single file.

R: @tessr @dpup 
Thoughts on grouping constants at the top of the file, rather than having them sporadically throughout the file?