Fix race conditions in katcp client tests