BUG: Raise when casting NaT to int
- [x] tests added / passed
- [x] passes `black pandas`
- [x] whatsnew entry

Fixes a bug in `astype_nansafe` where `NaT` was ignored when casting a datetime or timedelta to `int`.  I put the test in `pandas/tests/dtypes/test_common.py` since I couldn't find another place where `astype_nansafe` was tested.  Also adds various other tests for `astype_nansafe`.

Related: https://github.com/pandas-dev/pandas/pull/28438