Fixes several of the remote-data tests mentioned in #2290

Adds a simple context manager for turn_internet_off/turn_internet_on so that this particular test can work regardless of whether --remote-data is in use.

For the case of `get_icrs_coordinates` I found a couple cases where a `socket.timeout` error could occur that wasn't being caught.