coding: add gsm0503_detect_a[fh]s_dtx_frame2()

The new functions accept an additional mode_id poiner, which is
currently set for the following frames: AFS_ONSET, AHS_ONSET,
AHS_SID_FIRST_P2 with N * 16 - M bit pattern.

Also, the new API accepts soft-bits instead of hard-bits.
Converting bits from soft to hard is now performed internally.

Change-Id: Ibcac395f800bb64150c97fcdaca3523ecfc5fcee
Related: OS#5570
diff --git a/tests/dtx/dtx_gsm0503_test.ok b/tests/dtx/dtx_gsm0503_test.ok
index 60f3884..477d431 100644
--- a/tests/dtx/dtx_gsm0503_test.ok
+++ b/tests/dtx/dtx_gsm0503_test.ok
@@ -1,14 +1,14 @@
 FR AMR DTX FRAMES:
- ==> AFS_SID_FIRST, n_errors=0, n_bits_total=212
- ==> AFS_SID_UPDATE (marker), n_errors=0, n_bits_total=212
- ==> AFS_ONSET, n_errors=0, n_bits_total=228
+ ==> AFS_SID_FIRST, n_errors=0, n_bits_total=212, mode_id=-1
+ ==> AFS_SID_UPDATE (marker), n_errors=0, n_bits_total=212, mode_id=-1
+ ==> AFS_ONSET, n_errors=0, n_bits_total=228, mode_id=0
 HR AMR DTX FRAMES:
- ==> AHS_SID_UPDATE (marker), n_errors=0, n_bits_total=212
- ==> AHS_SID_FIRST_P1, n_errors=0, n_bits_total=212
- ==> AHS_SID_FIRST_P2, n_errors=0, n_bits_total=114
- ==> AHS_ONSET, n_errors=0, n_bits_total=114
- ==> AHS_SID_FIRST_INH, n_errors=0, n_bits_total=212
- ==> AHS_SID_UPDATE_INH, n_errors=0, n_bits_total=212
+ ==> AHS_SID_UPDATE (marker), n_errors=0, n_bits_total=212, mode_id=-1
+ ==> AHS_SID_FIRST_P1, n_errors=0, n_bits_total=212, mode_id=-1
+ ==> AHS_SID_FIRST_P2, n_errors=0, n_bits_total=114, mode_id=0
+ ==> AHS_ONSET, n_errors=0, n_bits_total=114, mode_id=0
+ ==> AHS_SID_FIRST_INH, n_errors=0, n_bits_total=212, mode_id=-1
+ ==> AHS_SID_UPDATE_INH, n_errors=0, n_bits_total=212, mode_id=-1
 Running test_gsm0503_tch_afhs_decode_dtx(at offset=0): testing detection of AFS_SID_UPDATE
  ==> gsm0503_tch_afs_decode_dtx() yields 'AFS_SID_UPDATE (marker)' (rc=0, BER 0/212)
 Running test_gsm0503_tch_afhs_decode_dtx(at offset=464): testing decoding of AFS_SID_UPDATE