gateway: make inbound and outbound threads daemons so exit happens cleanly
test: update test.py to exit on blank message for easier testing
gateway: also set GatewayCollection accept thread as daemon