Start removing dependence on gflags. Reviewed in https://codereview.appspot.com/7628044/. This only removes the dependency from the core library, a second CL will update all the samples.