=rem #16428 optimize protobuf serializer for master

#16428 for master
my suggestion did not solve what I said, here is a better:

    def fromBinary(bytes: Array[Byte], manifest: Option[Class[_]]): AnyRef =
      manifest match {
        case Some(clazz) ⇒
          @tailrec def parseFromMethod(method: Method = null): Method = {
            val parsingMethodBinding = parsingMethodBindingRef.get()
            parsingMethodBinding.get(clazz) match {
              case Some(m) => m
              case None =>
                val m = if (method eq null) clazz.getDeclaredMethod("parseFrom", ARRAY_OF_BYTE_ARRAY: _*) else method
                val newParsingMethodBinding = parsingMethodBinding.updated(clazz, m)
                if (parsingMethodBindingRef.compareAndSet(parsingMethodBinding, newParsingMethodBinding))
                  m
                else
                  parseFromMethod(m)
            }
          }
          parseFromMethod().invoke(null, bytes).asInstanceOf[Message]
  
        case None ⇒ throw new IllegalArgumentException("Need a protobuf message class to be able to serialize bytes using protobuf")
      }