Camera3: Only use Plain Old Data for global variable

When a shared library is loaded, the order in which its global
variables is not defined. For example, for case like below:

A a;
int *ptr = NULL;

Class A {
A() {
  if (ptr == NULL) {
      //do this;
  } else {
      // do that;
  }
}
};

ptr could be initialized before or after A, which causes the
behavior of A's constructor to be different.

The fix is to use Plain Old Data (integer, float, char, or pointer)
as global variable, and defer instantiation of class instance to
runtime.

Bug: 11822202
Change-Id: I806c527f06e19fc44e880d9a536ee7a060b4fa4f
1 file changed