Add library setup and teardown APIs

Add the following two functions to allow platform setup and teardown
operations for the full library to be hooked in:

* mbedtls_platform_setup()
* mbedtls_platform_teardown()

An mbedtls_platform_context C structure is also added and two internal
functions that are called by the corresponding setup and teardown
functions above:

* mbedtls_internal_platform_setup()
* mbedtls_internal_plartform_teardown()

Finally, the macro MBEDTLS_PLATFORM_SETUP_ALT is also added to allow
mbedtls_platform_context and internal function to be overriden by the
user as needed for a platform.
diff --git a/library/platform.c b/library/platform.c
index 8b336c3..2ac67cb 100644
--- a/library/platform.c
+++ b/library/platform.c
@@ -304,4 +304,34 @@
 #endif /* MBEDTLS_PLATFORM_NV_SEED_ALT */
 #endif /* MBEDTLS_ENTROPY_NV_SEED */
 
+int mbedtls_platform_setup( mbedtls_platform_context *ctx )
+{
+    return( mbedtls_internal_platform_setup( ctx ) );
+}
+
+void mbedtls_platform_teardown( mbedtls_platform_context *ctx )
+{
+    mbedtls_internal_platform_teardown( ctx );
+}
+
+#if !defined(MBEDTLS_PLATFORM_SETUP_ALT)
+/*
+ * Placeholder internal platform setup that does nothing by default
+ */
+int mbedtls_internal_platform_setup( mbedtls_platform_context *ctx )
+{
+    (void)ctx;
+
+    return( 0 );
+}
+
+/*
+ * Placeholder internal platform teardown that does nothing by default
+ */
+void mbedtls_internal_platform_teardown( mbedtls_platform_context *ctx )
+{
+    (void)ctx;
+}
+#endif /* MBEDTLS_PLATFORM_SETUP_ALT */
+
 #endif /* MBEDTLS_PLATFORM_C */