REF: PeriodIndex.get_loc
xref #30874 which does similar cleanup for TimedeltaIndex.

Do all parsing/casting/conversion before call to self._engine or super() methods (xref #30948)

Fix+test integers incorrectly getting through.

