[Mac] Use non-autoreleased mock object in ScopedBundleSwizzlerMac

The "release" call in the destructor might or might not destroy the
mock object, depending on current autorelease pool.
If we add to the picture the local autorelease pool (used in tests),
we no longer can name the class "Scoped".

The fix creates OCPartialMockObject without the helper function,
avoiding the autoreleasability.

Change-Id: Id17a1ef571246370f6e84cde60773f90d7d35cb0
Reviewed-on: https://chromium-review.googlesource.com/c/1375871
Reviewed-by: Avi Drissman <avi@chromium.org>
Commit-Queue: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#616424}
1 file changed