[pymorse] wait for publisher when closing

should fix #567, please test.