trans_free: tear down conn when last transaction is done

In trans_free(), call subscr_conn_release_when_unused(), so that we are sure to
clean up after the last transaction is done.

This fixes an error where a conn lingered after a CC failure, because that code
path forgot to trigger cleanup.

Rationale: so far we were triggering the release check after each DTAP dispatch
(compl_l3 and "normal" DTAP), which is sufficient for properly closed
transactions. We also need a check for when a timeout clears an erratic trans.

Adjust test expectation of test_call_mo_to_unknown_timeout to show that the
error is now fixed.

msc_vlr_test_reject_concurrency now sees an additional release checking event
when the SMS transaction is done, which is expected and does not affect the
test otherwise.

Related: OS#2779
Change-Id: I46ff2e9b09b67e4e0d79cccf8c04936f17281fcb
diff --git a/tests/msc_vlr/msc_vlr_test_call.c b/tests/msc_vlr/msc_vlr_test_call.c
index 3e9da62..7f97c35 100644
--- a/tests/msc_vlr/msc_vlr_test_call.c
+++ b/tests/msc_vlr/msc_vlr_test_call.c
@@ -482,20 +482,13 @@
 	fake_time_passes(10, 23);
 
 	btw("The CC Release times out and we still properly clear the conn");
-	btw("ERROR: currently this is broken and will be fixed in a subsequent commit");
 	cc_to_mncc_expect_tx("", MNCC_REL_CNF);
-	expect_iu_release(); /* <-- will currently not work out */
+	expect_iu_release();
 	fake_time_passes(10, 23);
 	OSMO_ASSERT(cc_to_mncc_tx_confirmed);
-	/* EXPECTING ERROR: here, we should be able to do:
 	OSMO_ASSERT(iu_release_sent);
-	EXPECT_CONN_COUNT(0);
-	*/
-	BTW("This test is currently expecting erratic behavior:");
-	EXPECT_CONN_COUNT(1);
-	/* need to free manually for the sake of this test suite */
-	msc_subscr_conn_close(g_conn, 0);
 
+	EXPECT_CONN_COUNT(0);
 	clear_vlr();
 	comment_end();
 }