Catch `NoneType` `__getstate__()` in tests.helper.py
Catch `NoneType` `__getstate__()` in tests.helper.py

Make pickling tests more robust

`astropy.tests.helper.generic_recursive_equality_test()`, which is used
in many pickling tests, is now more robust against objects with
`__slots__` or without `__dict__`.

Co-authored-by: Eero Vaher <17cf8c99e6676a0316d383272ff82e2d3f1dbd49@astro.lu.se>

pllim/astropy,mhvk/astropy,lpsinger/astropy,pllim/astropy,pllim/astropy,mhvk/astropy,astropy/astropy,astropy/astropy,astropy/astropy,lpsinger/astropy,lpsinger/astropy,mhvk/astropy,pllim/astropy,larrybradley/astropy,mhvk/astropy,astropy/astropy,larrybradley/astropy,larrybradley/astropy,larrybradley/astropy,pllim/astropy,lpsinger/astropy,astropy/astropy,mhvk/astropy,lpsinger/astropy,larrybradley/astropy