Add function to properly encode RAI

Add gsm48_encode_ra() which takes appropriate struct as [out] parameter
instead of generic buffer. Using uint8_t buffer instead of proper struct
type prooved to be error-prone - see Coverity CID57877, CID57876.

Old gsm48_construct_ra() is made into tiny wrapper around new
function. The test output is adjusted because of the change in function
return value which was constant and hence ignored anyway.

Related: OS#1640
Change-Id: I31f9605277f4945f207c2c44ff82e62399f8db74
diff --git a/tests/gsm0408/gsm0408_test.ok b/tests/gsm0408/gsm0408_test.ok
index f0abfd5..83165fa 100644
--- a/tests/gsm0408/gsm0408_test.ok
+++ b/tests/gsm0408/gsm0408_test.ok
@@ -1,11 +1,11 @@
 Test `CSD 9600/V.110/transparent' passed
 Test `Speech, all codecs' passed
 Simple TMSI encoding test....passed
-Constructed RA: 6 - OK
+Constructed RA:
 RA: MNC=121, MCC=77, LAC=666, RAC=5
 RA: MNC=121, MCC=77, LAC=666, RAC=5
 RA test...passed
-Constructed RA: 6 - OK
+Constructed RA:
 RA: MNC=98, MCC=84, LAC=11, RAC=89
 RA: MNC=98, MCC=84, LAC=11, RAC=89
 RA test...passed