Merge pull request #914 from mdboom/misc/cpychecker

Fix reference-counting bugs caught by cpychecker
Merge pull request #912 from mdboom/setup/generate-config-file-error-message

Fix a bug when generating the error message in `generate_config_file`
Merge pull request #917 from iguananaut/fits-merge

Merge branch 'master' into astropy
Conflicts:

	CHANGES.rst
Merge pull request #864 from iguananaut/issue-864

import coordinates: cannot import name sofa_time