reduce memory usage in ProtobufVarint32LengthFieldPrepender.java for issue [#2339] 

Patch for 4.0 because we use this version in production, but it also may be apply for 4.1 and master without changes