Rewrite error addition interface

The previous implementation of the error addition interface did not comply
with the invasive testing architecture guidelines. This commit fixes that
by:

- Renaming functions/macros/variables to follow the mbedtls_error_xxx or
  mbedtls_test_hook_xxx convention.

- Making mbedtls_test_hook_error_add a global variable that can be set
  by the testing code.

- Using a static inline function call, as opposed to macro, to keep
  discrepancies between debug and production version to a minimum.

Signed-off-by: Chris Jones <christopher.jones@arm.com>
diff --git a/tests/suites/main_test.function b/tests/suites/main_test.function
index 7cae0da..ac00f45 100644
--- a/tests/suites/main_test.function
+++ b/tests/suites/main_test.function
@@ -284,7 +284,7 @@
 int main( int argc, const char *argv[] )
 {
 #if defined(MBEDTLS_TEST_HOOKS) && defined (MBEDTLS_ERROR_C)
-    mbedtls_set_err_add_hook( &mbedtls_test_err_add_check );
+    mbedtls_test_hook_error_add = &mbedtls_test_err_add_check;
 #endif
 
     int ret = mbedtls_test_platform_setup();