Generate ERFA wrappers on-the-fly

(This is an alternative to https://github.com/astropy/astropy/pull/3166)

With this PR, which starts from one of @jwoillez's branches, ERFA files are generated on-the-fly, but only if any of the input files or scripts have been modified since the files were generated.

This does not require any changes to astropy-helpers and makes use of the current infrastructure.

I also made sure that ``sdist`` does not include the template files, and this also allows us to determine whether we are in release mode.

One change that could be made would be to just move the contents of ``cython_generate.py`` inside ``setup_package.py`` but I'll let @eteq decide on this.

cc @jwoillez @embray @mdboom @eteq @mhvk @taldcroft 
I guess the question is, do we think it's too hacky? This is basically guaranteed to work as long as we don't change ``setup_helpers.py`` in astropy-helpers (it has to always try and access ``include_dirs`` first). If distutills somehow change ``Extension`` to no longer have ``include_dirs`` it will break a lot of other stuff anyway. So I *think* we are safe?