[PATCH 3/4 v2] unit: re-factor test-rilmodem-cs server logic