[Cleanup] Used scoped pointers in KeyedServiceFactory's SetTestingFactory functions.

Along the way, clean up some tests' usage of SetTestingFactory().

BUG=NONE
TEST=git cl try

Review URL: https://codereview.chromium.org/1165913002

Cr-Commit-Position: refs/heads/master@{#333605}
132 files changed