SERVER-8388 scoped_db_conn_test threading issues

Made sure to wait for all listening threads to terminate before finishing one test case.