allow JS code to override the serialized format some

if an object of protobuf type CPPTYPE_STRING contains a .toProtobuf method that returns a Buffer

use that return value for the serialized stream