PeriodIndex test keys that aren't strings
Closes https://github.com/pydata/pandas/issues/10798

Not sure if the testing is done in a good way - I just copy & pasted code to test `PeriodIndex` & `DatetimeIndex` (it wouldn't work for `LikeDatetimeIndex` because of `TimeDeltaIndex`) - very open to feedback on better ways to do this.
