Move `MBEDTLS_ERR_ADD` macro and functions to `error.*`

`error.c` and  error.h are the more logical place to keep this code and it
prevents issues with building `common.c` and conflicts with other projects
that use mbedtls (such as mbedOS).

`error.c` has been automatically generated by first adding the code to
`error.fmt` and then running `./scripts/generate_errors.pl`.

Also add parenthesis to the addition in `MBEDTLS_ERR_ADD`.

Signed-off-by: Chris Jones <christopher.jones@arm.com>
diff --git a/tests/suites/main_test.function b/tests/suites/main_test.function
index 09927fe..76e1057 100644
--- a/tests/suites/main_test.function
+++ b/tests/suites/main_test.function
@@ -34,7 +34,7 @@
 #endif /* MBEDTLS_USE_PSA_CRYPTO */
 
 #if defined(MBEDTLS_TEST_HOOKS)
-#include "common.h"
+#include "mbedtls/error.h"
 #endif
 
 /* Test code may use deprecated identifiers only if the preprocessor symbol