[C++11] Pass unique_ptr by value instead of &&.

Suggestion by Richard Smith.