scripts: consolidate and standardize protobuf generation
Merge pull request #1146 from jonboulle/1146_protobuf

script protobuf generation