fix some InterruptException handling

Fix a number of places where catching InterruptException does not correctly reset the interrupted flag.