Solve No Previous Prototype GCC warning

In some cases there were missing includes of own
header files from implementation files.

In other cases moved function which are only used
within single file into an anonymous namespace.

Change-Id: I2c6b411bcfbc521e2a5f21265dc8e009a548b1c8
diff --git a/internal/ceres/types.cc b/internal/ceres/types.cc
index 1c8a986..2e19322 100644
--- a/internal/ceres/types.cc
+++ b/internal/ceres/types.cc
@@ -39,7 +39,7 @@
 #define CASESTR(x) case x: return #x
 #define STRENUM(x) if (value == #x) { *type = x; return true;}
 
-void UpperCase(string* input) {
+static void UpperCase(string* input) {
   std::transform(input->begin(), input->end(), input->begin(), ::toupper);
 }