BUG: dont' always coerce reductions in a groupby always to datetimes

only when we have actual Timestamps in the data (GH5788,GH5789)
closes #5789

TST: tests for idxmax used in an apply 
closes #5788