Added mechanism to provide alternative cipher / hash implementations

All symmetric cipher algorithms and hash algorithms now include support
for a POLARSSL_XXX_ALT flag that prevents the definition of the
algorithm context structure and all 'core' functions.
diff --git a/library/sha2.c b/library/sha2.c
index 7b375ff..20772ec 100644
--- a/library/sha2.c
+++ b/library/sha2.c
@@ -1,7 +1,7 @@
 /*
  *  FIPS-180-2 compliant SHA-256 implementation
  *
- *  Copyright (C) 2006-2010, 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>
@@ -38,6 +38,8 @@
 #include <stdio.h>
 #endif
 
+#if !defined(POLARSSL_SHA2_ALT)
+
 /*
  * 32-bit integer manipulation macros (big endian)
  */
@@ -310,6 +312,8 @@
         PUT_UINT32_BE( ctx->state[7], output, 28 );
 }
 
+#endif /* !POLARSSL_SHA2_ALT */
+
 /*
  * output = SHA-256( input buffer )
  */