Cleanup up non-prototyped functions (static) and const-correctness

More fixes based on the compiler directives -Wcast-qual -Wwrite-strings
-Wmissing-prototypes -Wmissing-declarations. Not everything with regards
to -Wcast-qual has been fixed as some have unwanted consequences for the
rest of the code.
diff --git a/library/x509parse.c b/library/x509parse.c
index caa4643..13be0e6 100644
--- a/library/x509parse.c
+++ b/library/x509parse.c
@@ -1,7 +1,7 @@
 /*
  *  X.509 certificate and private key decoding
  *
- *  Copyright (C) 2006-2011, Brainspark B.V.
+ *  Copyright (C) 2006-2013, Brainspark B.V.
  *
  *  This file is part of PolarSSL (http://www.polarssl.org)
  *  Lead Maintainer: Paul Bakker <polarssl_maintainer at polarssl.org>
@@ -1113,8 +1113,8 @@
 /*
  * Parse and fill a single X.509 certificate in DER format
  */
-int x509parse_crt_der_core( x509_cert *crt, const unsigned char *buf,
-                            size_t buflen )
+static int x509parse_crt_der_core( x509_cert *crt, const unsigned char *buf,
+                                   size_t buflen )
 {
     int ret;
     size_t len;
@@ -1813,7 +1813,7 @@
 /*
  * Load all data from a file into a given buffer.
  */
-int load_file( const char *path, unsigned char **buf, size_t *n )
+static int load_file( const char *path, unsigned char **buf, size_t *n )
 {
     FILE *f;
 
@@ -1994,7 +1994,7 @@
         ret = x509parse_key( rsa, buf, n, NULL, 0 );
     else
         ret = x509parse_key( rsa, buf, n,
-                (unsigned char *) pwd, strlen( pwd ) );
+                (const unsigned char *) pwd, strlen( pwd ) );
 
     memset( buf, 0, n + 1 );
     free( buf );
@@ -3101,7 +3101,7 @@
     return flags;
 }
 
-int x509_wildcard_verify( const char *cn, x509_buf *name )
+static int x509_wildcard_verify( const char *cn, x509_buf *name )
 {
     size_t i;
     size_t cn_idx = 0;