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/include/polarssl/pem.h b/include/polarssl/pem.h
index e95dc10..801c57b 100644
--- a/include/polarssl/pem.h
+++ b/include/polarssl/pem.h
@@ -86,7 +86,7 @@
  *
  * \return          0 on success, ior a specific PEM error code
  */
-int pem_read_buffer( pem_context *ctx, char *header, char *footer,
+int pem_read_buffer( pem_context *ctx, const char *header, const char *footer,
                      const unsigned char *data,
                      const unsigned char *pwd,
                      size_t pwdlen, size_t *use_len );
diff --git a/include/polarssl/ssl.h b/include/polarssl/ssl.h
index 3f93469..f95219c 100644
--- a/include/polarssl/ssl.h
+++ b/include/polarssl/ssl.h
@@ -383,11 +383,11 @@
     sha2_context fin_sha2;
     sha4_context fin_sha4;
 
-    void (*update_checksum)(ssl_context *, unsigned char *, size_t);
+    void (*update_checksum)(ssl_context *, const unsigned char *, size_t);
     void (*calc_verify)(ssl_context *, unsigned char *);
     void (*calc_finished)(ssl_context *, unsigned char *, int);
-    int  (*tls_prf)(unsigned char *, size_t, char *,
-                    unsigned char *, size_t,
+    int  (*tls_prf)(const unsigned char *, size_t, const char *,
+                    const unsigned char *, size_t,
                     unsigned char *, size_t);
 
     size_t pmslen;                      /*!<  premaster length        */
diff --git a/include/polarssl/xtea.h b/include/polarssl/xtea.h
index c95cb76..207e188 100644
--- a/include/polarssl/xtea.h
+++ b/include/polarssl/xtea.h
@@ -66,7 +66,7 @@
  * \param ctx      XTEA context to be initialized
  * \param key      the secret key
  */
-void xtea_setup( xtea_context *ctx, unsigned char key[16] );
+void xtea_setup( xtea_context *ctx, const unsigned char key[16] );
 
 /**
  * \brief          XTEA cipher function
@@ -80,7 +80,7 @@
  */
 int xtea_crypt_ecb( xtea_context *ctx,
                     int mode,
-                    unsigned char input[8],
+                    const unsigned char input[8],
                     unsigned char output[8] );
 
 /**
@@ -100,7 +100,7 @@
                     int mode,
                     size_t length,
                     unsigned char iv[8],
-                    unsigned char *input,
+                    const unsigned char *input,
                     unsigned char *output);
 
 #ifdef __cplusplus