BUG: fix DatetimeIndex join with PeriodIndex stack overflow
TST: add test for joining PeriodIndex with DatetimeIndex
CLN: remove unused imports
CLN: remove copying of PeriodIndex values on astype(int)
Merge pull request #5101 from cpcloud/fix-period-datetime-join-stack-overflow

BUG: fix PeriodIndex join with DatetimeIndex stack overflow