Inject unique_ptr/shared_ptr into the test instead of using <memory>

Summary:
Inject unique_ptr/shared_ptr into the test instead of using <memory>
Libraries might not be present on tests.
This fixes the break introduces at rL205854.

Reviewers: klimek

CC: cfe-commits

Differential Revision: http://reviews.llvm.org/D3330