GSUP: change osmo_gsup_encode() return type

* match return type of osmo_gsup_encode() with osmo_gsup_decode() to allow
  propagating error to caller
* check return value of osmo_gsup_encode() in GSUP test
* return errors instead of braking app with aseert

Change-Id: Idaa1deecb6d9e15329bd51867b4f6a03357461f0
Related: OS#2864
diff --git a/include/osmocom/gsm/gsup.h b/include/osmocom/gsm/gsup.h
index 5cfe1ec..1a8a3b2 100644
--- a/include/osmocom/gsm/gsup.h
+++ b/include/osmocom/gsm/gsup.h
@@ -179,6 +179,6 @@
 
 int osmo_gsup_decode(const uint8_t *data, size_t data_len,
 		     struct osmo_gsup_message *gsup_msg);
-void osmo_gsup_encode(struct msgb *msg, const struct osmo_gsup_message *gsup_msg);
+int osmo_gsup_encode(struct msgb *msg, const struct osmo_gsup_message *gsup_msg);
 
 /*! @} */