FIX use selected_obj rather the obj throughout groupby

TST dont ignore subselection in groupby
PERF #6570 patch by @jreback