BUG: PeriodIndex.asfreq silently converts offset to period
xref #52064

`PeriodIndex.asfreq` silently converts for offsets such as `offsets.MonthBegin()`, `offsets.BusinessMonthEnd()`, etc. (with no attribute `'_period_dtype_code'`) frequency to period frequency (in this case `'M'`).

Reproducible Example:
```
>>> import pandas as pd
>>> from pandas.tseries import offsets
>>>
>>> index = pd.PeriodIndex(["2020-01-01", "2021-01-01"], freq="Q")
>>> index.asfreq(freq=offsets.MonthBegin(1))
PeriodIndex(['2020-03', '2021-03'], dtype='period[M]')
>>>
>>> index.asfreq(freq=offsets.BusinessMonthEnd(1)) 
PeriodIndex(['2020-03', '2021-03'], dtype='period[M]')
```
the correct behaviour would be raising an Error:
```
>>> index.asfreq(freq=offsets.MonthBegin(1))
ValueError: <MonthBegin> is not supported as period frequency
>>>
>>> index.asfreq(freq=offsets.BusinessMonthEnd(1))
ValueError: <BusinessMonthEnd> is not supported as period frequency
```

corrected the definition of `PeriodIndex.asfreq`and added tests.
@MarcoGorelli, could you please take a look at this PR? I'd like to think that the suggestion in https://github.com/pandas-dev/pandas/pull/56945#pullrequestreview-1854233737 (i.e. raise if the return value of `to_offset(..., is_period=True)` doesn't have a `_period_dtype_code` attribute, could solve this too? closed by #56945