=rem #16428 optimize protobuf serializer for master

#16428 for master
the two level tailrec is optimized so much I think,and the . getOrElse one not that clean,but with overhead.I have write 5 version of this thing ,Event with AtomicReferenceFieldUpdater.But I could not put the updater in the companion object.