Simplified to_dataframe fix for DatetimeIndex indices

Also added the fix to `DatasetArray.to_series`.