update_engine: Fix all the "using" declaration usage.

This patch removes unused "using" declarations, that is, declarations
included in a .cc file at a global scope such that "using foo::bar"
that later don't use the identifier "bar" at all.

This also unifies the usage of these identifiers in the .cc files
in favor of using the short name defined by the using declaration.
For example, in several cases the .h refer to a type like
"std::string" because using declarations are forbidden in header
files while the .cc includes "using std::string;" with the purpose
of just writting "string" in the .cc file. Very rarely, the full
identifier is used when a local name ocludes it, for example,
StringVectorToGStrv() and StringVectorToString() in utils.cc named
its argument just "vector" need to refer to std::vector with the
full name. This patch renames those arguments instead.

Finally, it also sorts a few lists of using declarations that weren't
in order.

BUG=None
TEST=FEATURES=test emerge-link update_engine

Change-Id: I30f6b9510ecb7e03640f1951c48d5bb106309840
Reviewed-on: https://chromium-review.googlesource.com/226423
Reviewed-by: Alex Vakulenko <avakulenko@chromium.org>
Commit-Queue: Alex Deymo <deymo@chromium.org>
Tested-by: Alex Deymo <deymo@chromium.org>
diff --git a/bzip.cc b/bzip.cc
index 744ea67..808ae89 100644
--- a/bzip.cc
+++ b/bzip.cc
@@ -8,7 +8,6 @@
 #include <bzlib.h>
 #include "update_engine/utils.h"
 
-using std::max;
 using std::string;
 using std::vector;
 
@@ -78,13 +77,13 @@
 
 }  // namespace
 
-bool BzipDecompress(const std::vector<char>& in, std::vector<char>* out) {
+bool BzipDecompress(const vector<char>& in, vector<char>* out) {
   return BzipData<BzipBuffToBuffDecompress>(&in[0],
                                             static_cast<int32_t>(in.size()),
                                             out);
 }
 
-bool BzipCompress(const std::vector<char>& in, std::vector<char>* out) {
+bool BzipCompress(const vector<char>& in, vector<char>* out) {
   return BzipData<BzipBuffToBuffCompress>(&in[0], in.size(), out);
 }
 
@@ -92,8 +91,8 @@
 template<bool F(const char* const in,
                 const int32_t in_size,
                 vector<char>* const out)>
-bool BzipString(const std::string& str,
-                std::vector<char>* out) {
+bool BzipString(const string& str,
+                vector<char>* out) {
   TEST_AND_RETURN_FALSE(out);
   vector<char> temp;
   TEST_AND_RETURN_FALSE(F(str.data(),
@@ -105,13 +104,13 @@
 }
 }  // namespace
 
-bool BzipCompressString(const std::string& str,
-                        std::vector<char>* out) {
+bool BzipCompressString(const string& str,
+                        vector<char>* out) {
   return BzipString<BzipData<BzipBuffToBuffCompress>>(str, out);
 }
 
-bool BzipDecompressString(const std::string& str,
-                          std::vector<char>* out) {
+bool BzipDecompressString(const string& str,
+                          vector<char>* out) {
   return BzipString<BzipData<BzipBuffToBuffDecompress>>(str, out);
 }