Changed to use unique_ptr when C++11 is enabled; made other fixes to enable move semantics

[SVN r86733]