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