Block internet connection during testing if `--remote-data` not specified

This PR implements in astropy what is used in astroquery to block internet connections when testing without `--remote-data` active.  The main intent is to prevent tests from unintentionally being created without the `--remote-data` flag when they should have it.  In astroquery, this is *essential* to prevent spamming of the data-providing services via tests.  In astropy, it will be more of a convenience for users (i.e., tests can be run without internet connection) and will prevent tests from failing in a non-deterministic way if some required remote server goes down during testing.

cc @eteq; we discussed this on the telecon.