SessionSerializer: Use std::unique_ptr instead of std::shared_ptr