PolicyManager: Move the global variables to Provider members.

Per the Google C++ Style Guide, the global variables can't be
instances of a class and that includes smart pointers like
scoped_ptr. The alternative is to use plain pointers such as a
Variable<T>*. The disadvantage of this approach is that the memory
pointed by this global variable is managed by a singleton class
(a FooProvider) on production code and a different class during
testing (a FakeFooProvider). Also, these classes, fake and real
implementation, aren't forced to implement the same set of variables
since there's no common interface. Finally, the
construction/destruction of these variables also needs to handle the
global pointer, nulifying it after deletion.

This patch moves the global variable to a member of a base class that
hides the initialization of these variables to a subclass. This patch
includes a subclass with the real implementation.

BUG=chromium:338591
TEST=unittest passes.

Change-Id: I0aa43c51d72c65d97be280fd58307d085bb8577b
Reviewed-on: https://chromium-review.googlesource.com/184774
Tested-by: Alex Deymo <deymo@chromium.org>
Reviewed-by: Gilad Arnold <garnold@chromium.org>
Commit-Queue: Alex Deymo <deymo@chromium.org>
diff --git a/policy_manager/variable.h b/policy_manager/variable.h
index 9b933d7..7dcb5b9 100644
--- a/policy_manager/variable.h
+++ b/policy_manager/variable.h
@@ -39,8 +39,8 @@
   virtual ~Variable() {}
 
  protected:
-  friend class PmRandomProviderTest;
-  FRIEND_TEST(PmRandomProviderTest, GetRandomValues);
+  friend class PmRealRandomProviderTest;
+  FRIEND_TEST(PmRealRandomProviderTest, GetRandomValues);
 
   // Gets the current value of the variable. The current value is copied to a
   // new object and returned. The caller of this method owns the object and