centralize handling of common errors like "endpoint not found"

Previously we
* did not distinguish between the cause of errors in mgcp_header_parse
* common errors were not handled in mgcp_handle_message() but in
  individual per-verb functions

Let's centralize the handling of generating error responses and remove
that burden from the individual per-verb handler functions.

Change-Id: I463b27306e10ae3b021583ed102977e7299e5e66
diff --git a/tests/mgcp/mgcp_test.c b/tests/mgcp/mgcp_test.c
index 46fc1c1..46fd69b 100644
--- a/tests/mgcp/mgcp_test.c
+++ b/tests/mgcp/mgcp_test.c
@@ -76,7 +76,7 @@
 #define SHORT_RET "510 000000 FAIL\r\n"
 
 #define MDCX_WRONG_EP "MDCX 18983213 ds/e1-3/1@172.16.6.66 MGCP 1.0\r\n"
-#define MDCX_ERR_RET "510 18983213 FAIL\r\n"
+#define MDCX_ERR_RET "500 18983213 FAIL\r\n"
 #define MDCX_UNALLOCATED "MDCX 18983214 ds/e1-1/2@172.16.6.66 MGCP 1.0\r\n"
 #define MDCX_RET "400 18983214 FAIL\r\n"