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/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        */