Update ah_bootstrap.py from astropy-helpers

This PR copies `ah_bootstrap.py` from latest astropy-helpers.