Revert partially "Replace deprecated std::auto_ptr with boost::scoped_ptr"

This reverts partially commit 4a9347fa320d892b60fd03082925f63a1d69cfb9.

Change-Id: Ibbc626f8d30de040fe9e809b44d5ffc9513720fb