[Java]: Improve protobuf performance tests based on Kenton's feedback.