Rename BIO_print_errors_fp back to ERR_print_errors_fp & refactor it.

A previous change in BoringSSL renamed ERR_print_errors_fp to
BIO_print_errors_fp as part of refactoring the code to improve the
layering of modules within BoringSSL. Rename it back for better
compatibility with code that was using the function under the original
name. Move its definition back to crypto/err using an implementation
that avoids depending on crypto/bio.

Change-Id: Iee7703bb1eb4a3d640aff6485712bea71d7c1052
Reviewed-on: https://boringssl-review.googlesource.com/4310
Reviewed-by: Adam Langley <agl@google.com>
diff --git a/crypto/bn/bn_test.cc b/crypto/bn/bn_test.cc
index a1f294d..caef572 100644
--- a/crypto/bn/bn_test.cc
+++ b/crypto/bn/bn_test.cc
@@ -945,7 +945,7 @@
       a->neg = rand_neg();
       b->neg = rand_neg();
       if (!BN_mod_mul(e.get(), a.get(), b.get(), c.get(), ctx)) {
-        BIO_print_errors_fp(stderr);
+        ERR_print_errors_fp(stderr);
         return false;
       }
       if (bp != NULL) {
@@ -975,7 +975,7 @@
       }
       if (!BN_is_zero(b.get())) {
         fprintf(stderr, "Modulo multiply test failed!\n");
-        BIO_print_errors_fp(stderr);
+        ERR_print_errors_fp(stderr);
         return false;
       }
     }
@@ -1323,7 +1323,7 @@
                  0 /* don't modify bottom bit */) ||
         !BN_mul(nn.get(), n.get(), n.get(), ctx) ||
         !BN_sqrt(sqrt.get(), nn.get(), ctx)) {
-      BIO_print_errors_fp(stderr);
+      ERR_print_errors_fp(stderr);
       return false;
     }
     if (BN_cmp(n.get(), sqrt.get()) != 0) {
@@ -1339,7 +1339,7 @@
                  0 /* don't modify bottom bit */) ||
         !BN_mul(nn.get(), n.get(), n.get(), ctx) ||
         !BN_add(nn.get(), nn.get(), BN_value_one())) {
-      BIO_print_errors_fp(stderr);
+      ERR_print_errors_fp(stderr);
       return false;
     }
 
@@ -1380,7 +1380,7 @@
   for (size_t bytes = 128 - 7; bytes <= 128; bytes++) {
     if (!BN_rand(n.get(), bytes * 8, 0 /* make sure top bit is 1 */,
                  0 /* don't modify bottom bit */)) {
-      BIO_print_errors_fp(stderr);
+      ERR_print_errors_fp(stderr);
       return false;
     }
     if (BN_num_bytes(n.get()) != bytes ||