Move internal mbedtls_x509_crt_cache to x509_internal.h

We cannot move it to x509_crt.c because there are some static inline
function definitions in x509_crt.h which access members of
mbedtls_x509_crt_cache.
diff --git a/include/mbedtls/x509_internal.h b/include/mbedtls/x509_internal.h
index 6fc6fe6..30f4288 100644
--- a/include/mbedtls/x509_internal.h
+++ b/include/mbedtls/x509_internal.h
@@ -26,6 +26,23 @@
 #define MBEDTLS_X509_INTERNAL_H
 
 #include "x509.h"
+#include "threading.h"
+
+/* Internal structure used for caching parsed data from an X.509 CRT. */
+
+struct mbedtls_x509_crt;
+struct mbedtls_pk_context;
+struct mbedtls_x509_crt_frame;
+typedef struct mbedtls_x509_crt_cache
+{
+#if defined(MBEDTLS_THREADING_C)
+    mbedtls_threading_mutex_t frame_mutex;
+    mbedtls_threading_mutex_t pk_mutex;
+#endif
+    mbedtls_x509_buf_raw pk_raw;
+    struct mbedtls_x509_crt_frame *frame;
+    struct mbedtls_pk_context *pk;
+} mbedtls_x509_crt_cache;
 
 int mbedtls_x509_get_name( unsigned char *p, size_t len,
                            mbedtls_x509_name *cur );