[caffe2] update the BlobSerializer acceptor to allow moving in the data (#60207)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/60207
Update the `BlobSerializerBase` API so that the serizialized blob data is
passed as a `std::string&&` rather than `const std::string&`. This allows the
acceptor to take ownership of the string data. This allows the acceptor to do
things like queue it for storing asynchronously, rather than having to make a
copy of the data if they need it to remain valid after returning.
All existing `BlobSerializerBase` implementations already pass in a valid
rvalue reference to the data, so this change did not require updating any of
the existing serializer implementations.
ghstack-source-id: 132216750
Test Plan:
Examined all ~46 `BlobSerializerBase` subclasses in fbsource to confirm they
already pass in an rvalue reference for this argument. Also searched for
`BlobSerializerBase` on google and did not find any external references to
this class in other open source projects that might be affected.
Differential Revision: D29204426
fbshipit-source-id: b1d567e52a5c17a01d651c70bbfa2fddbaea6cd9