cleanup and compilation

goprotobuf changes and fixes so that it compiles cc @ha