Remove string.h from base.h.

Including string.h in base.h causes any file that includes a BoringSSL
header to include string.h. Generally this wouldn't be a problem,
although string.h might slow down the compile if it wasn't otherwise
needed. However, it also causes problems for ipsec-tools in Android
because OpenSSL didn't have this behaviour.

This change removes string.h from base.h and, instead, adds it to each
.c file that requires it.

Change-Id: I5968e50b0e230fd3adf9b72dd2836e6f52d6fb37
Reviewed-on: https://boringssl-review.googlesource.com/3200
Reviewed-by: David Benjamin <davidben@chromium.org>
Reviewed-by: Adam Langley <agl@google.com>
diff --git a/crypto/dsa/dsa.c b/crypto/dsa/dsa.c
index cbd36be..8816b63 100644
--- a/crypto/dsa/dsa.c
+++ b/crypto/dsa/dsa.c
@@ -59,6 +59,8 @@
 
 #include <openssl/dsa.h>
 
+#include <string.h>
+
 #include <openssl/asn1.h>
 #include <openssl/dh.h>
 #include <openssl/engine.h>
@@ -68,6 +70,7 @@
 
 #include "internal.h"
 
+
 extern const DSA_METHOD DSA_default_method;
 
 DSA *DSA_new(void) { return DSA_new_method(NULL); }
diff --git a/crypto/dsa/dsa_asn1.c b/crypto/dsa/dsa_asn1.c
index 72b2cc6..933fba7 100644
--- a/crypto/dsa/dsa_asn1.c
+++ b/crypto/dsa/dsa_asn1.c
@@ -54,6 +54,8 @@
 
 #include <openssl/dsa.h>
 
+#include <string.h>
+
 #include <openssl/asn1.h>
 #include <openssl/asn1t.h>
 #include <openssl/err.h>
diff --git a/crypto/dsa/dsa_impl.c b/crypto/dsa/dsa_impl.c
index fd027b0..6719758 100644
--- a/crypto/dsa/dsa_impl.c
+++ b/crypto/dsa/dsa_impl.c
@@ -59,6 +59,8 @@
 
 #include <openssl/dsa.h>
 
+#include <string.h>
+
 #include <openssl/bn.h>
 #include <openssl/digest.h>
 #include <openssl/err.h>
diff --git a/crypto/dsa/dsa_test.c b/crypto/dsa/dsa_test.c
index e38720c..1273638 100644
--- a/crypto/dsa/dsa_test.c
+++ b/crypto/dsa/dsa_test.c
@@ -59,6 +59,8 @@
 
 #include <openssl/dsa.h>
 
+#include <string.h>
+
 #include <openssl/bio.h>
 #include <openssl/bn.h>
 #include <openssl/crypto.h>